ColorButton: Added ImGuiColorEditFlags_NoBorder flag to remove the border normally enforced by default.

This commit is contained in:
omar
2020-02-10 21:23:34 +01:00
parent 21b9e42964
commit d8948b5343
4 changed files with 20 additions and 8 deletions

View File

@ -1264,7 +1264,9 @@ static void ShowDemoWindowWidgets()
}
ImGui::Text("Color button only:");
ImGui::ColorButton("MyColor##3c", *(ImVec4*)&color, misc_flags, ImVec2(80,80));
static bool no_border = false;
ImGui::Checkbox("ImGuiColorEditFlags_NoBorder", &no_border);
ImGui::ColorButton("MyColor##3c", *(ImVec4*)&color, misc_flags | (no_border ? ImGuiColorEditFlags_NoBorder : 0), ImVec2(80,80));
ImGui::Text("Color picker:");
static bool alpha = true;