fix tooltip wonkyness (#4856)

This commit is contained in:
briaguya 2025-01-11 20:06:34 -05:00 committed by GitHub
parent 66f5e6c26c
commit b774d39bc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,11 +213,11 @@ namespace UIWidgets {
} }
void ReEnableComponent(const char* disabledTooltipText) { void ReEnableComponent(const char* disabledTooltipText) {
// End of disable region of previous component
ImGui::PopStyleVar(1);
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) { if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
ImGui::SetTooltip("%s", disabledTooltipText); ImGui::SetTooltip("%s", disabledTooltipText);
} }
// End of disable region of previous component
ImGui::PopStyleVar(1);
ImGui::PopItemFlag(); ImGui::PopItemFlag();
} }