gui housekeeping

This commit is contained in:
scawful
2024-08-13 01:09:18 -04:00
parent f1f2a7a25f
commit 3c433e5fd5
4 changed files with 6 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ namespace yaze {
namespace app {
namespace gui {
ImVec4 ConvertSNESColorToImVec4(const SnesColor& color) {
ImVec4 ConvertSnesColorToImVec4(const SnesColor& color) {
return ImVec4(static_cast<float>(color.rgb().x) / 255.0f,
static_cast<float>(color.rgb().y) / 255.0f,
static_cast<float>(color.rgb().z) / 255.0f,
@@ -26,7 +26,7 @@ IMGUI_API bool SnesColorButton(absl::string_view id, SnesColor& color,
ImGuiColorEditFlags flags,
const ImVec2& size_arg) {
// Convert the SNES color values to ImGui color values
ImVec4 displayColor = ConvertSNESColorToImVec4(color);
ImVec4 displayColor = ConvertSnesColorToImVec4(color);
// Call the original ImGui::ColorButton with the converted color
bool pressed = ImGui::ColorButton(id.data(), displayColor, flags, size_arg);
@@ -41,7 +41,7 @@ IMGUI_API bool SnesColorButton(absl::string_view id, SnesColor& color,
IMGUI_API bool SnesColorEdit4(absl::string_view label, SnesColor* color,
ImGuiColorEditFlags flags) {
ImVec4 displayColor = ConvertSNESColorToImVec4(*color);
ImVec4 displayColor = ConvertSnesColorToImVec4(*color);
// Call the original ImGui::ColorEdit4 with the converted color
bool pressed =