mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-19 14:19:57 +01:00
BugFix: non-ImGui calls to accent color cause crash
This commit is contained in:
@@ -1617,12 +1617,15 @@ void ImGuiToolkit::WindowDragFloat(const char* window_name, ImVec2 window_pos, f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImVec4 __colorHighlight;
|
||||||
|
ImVec4 __colorHighlightActive;
|
||||||
|
|
||||||
ImVec4 ImGuiToolkit::HighlightColor(bool active)
|
ImVec4 ImGuiToolkit::HighlightColor(bool active)
|
||||||
{
|
{
|
||||||
if (active)
|
if (active)
|
||||||
return ImGui::GetStyle().Colors[ImGuiCol_CheckMark];
|
return __colorHighlightActive;
|
||||||
else
|
else
|
||||||
return ImGui::GetStyle().Colors[ImGuiCol_TabUnfocusedActive];
|
return __colorHighlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiToolkit::SetAccentColor(accent_color color)
|
void ImGuiToolkit::SetAccentColor(accent_color color)
|
||||||
@@ -1790,6 +1793,9 @@ void ImGuiToolkit::SetAccentColor(accent_color color)
|
|||||||
colors[ImGuiCol_DragDropTarget] = colors[ImGuiCol_HeaderActive];
|
colors[ImGuiCol_DragDropTarget] = colors[ImGuiCol_HeaderActive];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__colorHighlight = colors[ImGuiCol_TabUnfocusedActive];
|
||||||
|
__colorHighlightActive = colors[ImGuiCol_CheckMark];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void word_wrap(std::string *str, unsigned per_line)
|
void word_wrap(std::string *str, unsigned per_line)
|
||||||
|
|||||||
Reference in New Issue
Block a user