Currently ButtonColored() takes h,s,v values as three separate floats. It'd be nice if there was an alternate signature that took these as a vec3, which would provide easier interop with UI::ToHSV and friends.
As it stands, some styling actions (such as colored buttons that "default" to the user's imgui style) are rather clunky:
vec3 hsv;
if (someCondition) {
hsv.x = 1;
hsv.y = 1;
hsv.z = 1;
} else { // use normal imgui colors
hsv = UI::ToHSV(UI::GetStyleColor(UI::Col::Button).x, UI::GetStyleColor(UI::Col::Button).y, UI::GetStyleColor(UI::Col::Button).z)
}
if (UI::ButtonColored("label", hsv.x, hsv.y, hsv.z)) {
// do stuff
}
Currently ButtonColored() takes h,s,v values as three separate floats. It'd be nice if there was an alternate signature that took these as a vec3, which would provide easier interop with UI::ToHSV and friends.
As it stands, some styling actions (such as colored buttons that "default" to the user's imgui style) are rather clunky: