Add the SNES color representation to the tooltip
This commit is contained in:
@@ -30,7 +30,12 @@ IMGUI_API bool SnesColorButton(absl::string_view id, SnesColor& color,
|
|||||||
|
|
||||||
// Call the original ImGui::ColorButton with the converted color
|
// Call the original ImGui::ColorButton with the converted color
|
||||||
bool pressed = ImGui::ColorButton(id.data(), displayColor, flags, size_arg);
|
bool pressed = ImGui::ColorButton(id.data(), displayColor, flags, size_arg);
|
||||||
|
// Add the SNES color representation to the tooltip
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::Text("SNES: $%04X", color.snes());
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
return pressed;
|
return pressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user