From 242c9d96e8330f204382b109bc436d2674bb3d0a Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Fri, 1 Nov 2024 11:51:43 +0100 Subject: [PATCH] Add tooltip for unsupported features --- client/scenes/lobby_gui.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index 797ebaef..d6872557 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -545,6 +545,8 @@ void scenes::lobby::gui_settings() config.save(); } vibrate_on_hover(); + if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) + tooltip(_("This feature is not supported by your headset")); ImGui::EndDisabled(); } { @@ -556,6 +558,8 @@ void scenes::lobby::gui_settings() config.save(); } vibrate_on_hover(); + if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) + tooltip(_("This feature is not supported by your headset")); ImGui::EndDisabled(); } { @@ -567,6 +571,8 @@ void scenes::lobby::gui_settings() config.save(); } ImGui::EndDisabled(); + if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) + tooltip(_("This feature is not supported by your headset")); vibrate_on_hover(); } @@ -577,6 +583,8 @@ void scenes::lobby::gui_settings() config.save(); } vibrate_on_hover(); + if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) + tooltip(_("This feature is not supported by your headset")); ImGui::EndDisabled(); if (ImGui::Checkbox(_S("Show performance metrics"), &config.show_performance_metrics))