Position the tooltip for disabled settings on top of the setting instead of following the cursor

This commit is contained in:
Guillaume Meunier
2026-07-26 17:24:36 +02:00
parent 9b220e6f70
commit 1ca43be072
+2 -2
View File
@@ -21,8 +21,8 @@
// ui:: widget for each, rebuilt every frame so dynamic options/descriptions just work
// same pages serve the lobby and the in-stream window, gated by ctx.in_game
#include "scenes/gui_common.h"
#define IMGUI_DEFINE_MATH_OPERATORS
#include "scenes/gui_common.h"
#include "gui_settings.h"
@@ -170,7 +170,7 @@ void render_settings(const wivrn::gui::settings_context & ctx, const char * card
{
const ImVec2 row_max{row_min.x + ImGui::GetContentRegionAvail().x, ImGui::GetCursorScreenPos().y};
if (ImGui::IsMouseHoveringRect(row_min, row_max))
ctx.imgui_ctx.tooltip(s.disabled_tooltip, ImGui::GetMousePos());
ctx.imgui_ctx.tooltip(s.disabled_tooltip, (row_min + row_max) / 2);
}
}