Created
July 31, 2019 00:17
-
-
Save moebiussurfing/5022713b88a6233fdc6494f9f1836443 to your computer and use it in GitHub Desktop.
ImGui color picker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static ImVec4 color; | |
color.x = color_backGround.get().r; | |
color.y = color_backGround.get().g; | |
color.z = color_backGround.get().b; | |
color.w = color_backGround.get().a; | |
// squared box | |
ImGuiColorEditFlags colorEdiFlags = | |
ImGuiColorEditFlags_NoSmallPreview | | |
ImGuiColorEditFlags_NoTooltip | | |
ImGuiColorEditFlags_NoLabel | | |
ImGuiColorEditFlags_NoSidePreview | | |
ImGuiColorEditFlags_NoInputs | | |
ImGuiColorEditFlags_NoAlpha | | |
ImGuiColorEditFlags_PickerHueBar; | |
ImGui::ColorPicker4("Background Color", (float *) &color, colorEdiFlags); | |
// ImGui::ColorPicker4("Background Color", color_backGround.get(), colorEdiFlags); | |
color_backGround = color; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment