Code cleanup and fixes

Added color picker for clear color
This commit is contained in:
Sascha Willems 2023-02-24 16:13:31 +01:00
parent 99a09ee9f2
commit 5017d380af
3 changed files with 21 additions and 46 deletions

View file

@ -501,6 +501,12 @@ namespace vks
return res;
}
bool UIOverlay::colorPicker(const char* caption, float* color) {
bool res = ImGui::ColorEdit4(caption, color, ImGuiColorEditFlags_NoInputs);
if (res) { updated = true; };
return res;
}
void UIOverlay::text(const char *formatstr, ...)
{
va_list args;

View file

@ -87,6 +87,7 @@ namespace vks
bool sliderInt(const char* caption, int32_t* value, int32_t min, int32_t max);
bool comboBox(const char* caption, int32_t* itemindex, std::vector<std::string> items);
bool button(const char* caption);
bool colorPicker(const char* caption, float* color);
void text(const char* formatstr, ...);
};
}