mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Committed our own changes in ImGUI, see commits
042880ba2d67c55c7490a94c952b40b3f8ae5ca72455df40173ca3a544a8870aba8d1562c2095fe8This should contain exactly the same changes.
This commit is contained in:
@@ -34,6 +34,8 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
#include "imgui_internal.h"
|
||||
#include "imconfig.h"
|
||||
|
||||
#ifdef IMGUI_ENABLE_FREETYPE
|
||||
#include "misc/freetype/imgui_freetype.h"
|
||||
#endif
|
||||
@@ -3564,6 +3566,14 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
||||
|
||||
const ImU32 col_untinted = col | ~IM_COL32_A_MASK;
|
||||
|
||||
ImU32 defaultCol = col;
|
||||
ImU32 highlighCol = ImGui::GetColorU32(ImGuiCol_ButtonHovered);
|
||||
// if text is started with ColorMarkerHovered symbol, we should use another color for a highlighting
|
||||
if (*s == ImGui::ColorMarkerHovered) {
|
||||
highlighCol = ImGui::GetColorU32(ImGuiCol_FrameBg);
|
||||
s += 1;
|
||||
}
|
||||
|
||||
while (s < text_end)
|
||||
{
|
||||
if (word_wrap_enabled)
|
||||
@@ -3592,6 +3602,17 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
||||
}
|
||||
}
|
||||
|
||||
if (*s == ImGui::ColorMarkerStart) {
|
||||
col = highlighCol;
|
||||
s += 1;
|
||||
}
|
||||
else if (*s == ImGui::ColorMarkerEnd) {
|
||||
col = defaultCol;
|
||||
s += 1;
|
||||
if (s == text_end)
|
||||
break;
|
||||
}
|
||||
|
||||
// Decode and advance source
|
||||
unsigned int c = (unsigned int)*s;
|
||||
if (c < 0x80)
|
||||
|
||||
Reference in New Issue
Block a user