Skip to content

Commit 47522f4

Browse files
committed
Fix build for removal of ImGuiColorEditFlags_AlphaPreview in IMGUI_VERSION_NUM=19173
Only necessary when using IMGUI_DISABLE_OBSOLETE_FUNCTIONS.
1 parent f1b0792 commit 47522f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

implot.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5005,9 +5005,15 @@ void ShowStyleEditor(ImPlotStyle* ref) {
50055005
filter.Draw("Filter colors", ImGui::GetFontSize() * 16);
50065006

50075007
static ImGuiColorEditFlags alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf;
5008+
#if IMGUI_VERSION_NUM < 19173
50085009
if (ImGui::RadioButton("Opaque", alpha_flags == ImGuiColorEditFlags_None)) { alpha_flags = ImGuiColorEditFlags_None; } ImGui::SameLine();
50095010
if (ImGui::RadioButton("Alpha", alpha_flags == ImGuiColorEditFlags_AlphaPreview)) { alpha_flags = ImGuiColorEditFlags_AlphaPreview; } ImGui::SameLine();
50105011
if (ImGui::RadioButton("Both", alpha_flags == ImGuiColorEditFlags_AlphaPreviewHalf)) { alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; } ImGui::SameLine();
5012+
#else
5013+
if (ImGui::RadioButton("Opaque", alpha_flags == ImGuiColorEditFlags_AlphaOpaque)) { alpha_flags = ImGuiColorEditFlags_AlphaOpaque; } ImGui::SameLine();
5014+
if (ImGui::RadioButton("Alpha", alpha_flags == ImGuiColorEditFlags_None)) { alpha_flags = ImGuiColorEditFlags_None; } ImGui::SameLine();
5015+
if (ImGui::RadioButton("Both", alpha_flags == ImGuiColorEditFlags_AlphaPreviewHalf)) { alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; } ImGui::SameLine();
5016+
#endif
50115017
HelpMarker(
50125018
"In the color list:\n"
50135019
"Left-click on colored square to open color picker,\n"

0 commit comments

Comments
 (0)