1
0
mirror of synced 2025-01-18 00:56:49 +01:00

fix: Highlight color of bookmark not changing with bookmark

This commit is contained in:
WerWolv 2023-11-14 16:50:38 +01:00
parent 5e523f4cd8
commit 43f1cc7bd0

View File

@ -171,8 +171,11 @@ namespace hex::plugin::builtin {
return result; return result;
}(); }();
bool colorChanged = false;
// Draw default color picker // Draw default color picker
ImGui::ColorPicker4("##picker", (float*)&color, ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoSmallPreview); if (ImGui::ColorPicker4("##picker", (float*)&color, ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoSmallPreview))
colorChanged = true;
ImGui::Separator(); ImGui::Separator();
@ -186,11 +189,15 @@ namespace hex::plugin::builtin {
constexpr static ImGuiColorEditFlags flags = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_NoDragDrop; constexpr static ImGuiColorEditFlags flags = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_NoDragDrop;
if (ImGui::ColorButton("##palette", paletteColor.Value, flags, ImVec2(20, 20))) { if (ImGui::ColorButton("##palette", paletteColor.Value, flags, ImVec2(20, 20))) {
color = paletteColor; color = paletteColor;
colorChanged = true;
} }
ImGui::PopID(); ImGui::PopID();
id++; id++;
} }
if (colorChanged)
EventManager::post<EventHighlightingChanged>();
} }
void ViewBookmarks::drawContent() { void ViewBookmarks::drawContent() {