From e41410bcc98a4fb6a38b1ea9f0f4025406063bc1 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Mon, 29 Dec 2025 11:18:13 +0100 Subject: [PATCH] Hide unsupported features in lobby config --- client/scenes/lobby_gui.cpp | 58 +++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index 0ada2c84..263cde21 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -806,8 +806,8 @@ void scenes::lobby::gui_settings() ImGui::Unindent(); ImGui::EndDisabled(); } + if (system.hand_tracking_supported()) { - ImGui::BeginDisabled(not system.hand_tracking_supported()); bool enabled = config.check_feature(feature::hand_tracking); if (ImGui::Checkbox(_S("Enable hand tracking"), &enabled)) { @@ -816,10 +816,9 @@ void scenes::lobby::gui_settings() imgui_ctx->vibrate_on_hover(); if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) imgui_ctx->tooltip(_("This feature is not supported by your headset")); - ImGui::EndDisabled(); } + if (application::get_eye_gaze_supported()) { - ImGui::BeginDisabled(not application::get_eye_gaze_supported()); bool enabled = config.check_feature(feature::eye_gaze); if (ImGui::Checkbox(_S("Enable eye tracking"), &enabled)) { @@ -828,30 +827,26 @@ void scenes::lobby::gui_settings() imgui_ctx->vibrate_on_hover(); if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) imgui_ctx->tooltip(_("This feature is not supported by your headset")); - ImGui::EndDisabled(); } + if (system.face_tracker_supported() != xr::face_tracker_type::none) { - ImGui::BeginDisabled(system.face_tracker_supported() == xr::face_tracker_type::none); bool enabled = config.check_feature(feature::face_tracking); if (ImGui::Checkbox(_S("Enable face tracking"), &enabled)) { config.set_feature(feature::face_tracking, enabled); } - ImGui::EndDisabled(); if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)) imgui_ctx->tooltip(_("This feature is not supported by your headset")); imgui_ctx->vibrate_on_hover(); } - auto body_tracker = system.body_tracker_supported(); + if (auto body_tracker = system.body_tracker_supported(); body_tracker != xr::body_tracker_type::none) { - ImGui::BeginDisabled(body_tracker == xr::body_tracker_type::none); bool enabled = config.check_feature(feature::body_tracking); if (ImGui::Checkbox(_S("Enable body tracking"), &enabled)) { config.set_feature(feature::body_tracking, enabled); } - ImGui::EndDisabled(); if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) { if (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled) @@ -866,31 +861,32 @@ void scenes::lobby::gui_settings() } imgui_ctx->vibrate_on_hover(); - } - if (body_tracker == xr::body_tracker_type::fb) - { - ImGui::BeginDisabled(not config.check_feature(feature::body_tracking)); - ImGui::Indent(); - if (ImGui::Checkbox(_S("Enable lower body tracking"), &config.fb_lower_body)) - { - config.save(); - } - imgui_ctx->vibrate_on_hover(); - if (ImGui::IsItemHovered()) - imgui_ctx->tooltip(_("Estimate lower body joint positions using Generative Legs\nRequires 'Hand and body tracking' to be enabled in the Quest movement tracking settings")); - ImGui::BeginDisabled(not config.fb_lower_body); - if (ImGui::Checkbox(_S("Enable hip tracking"), &config.fb_hip)) + if (body_tracker == xr::body_tracker_type::fb) { - config.save(); - } - imgui_ctx->vibrate_on_hover(); - if (ImGui::IsItemHovered()) - imgui_ctx->tooltip(_("Only takes affect with lower body tracking enabled\nMay be desired when using another source of hip tracking")); - ImGui::EndDisabled(); + ImGui::BeginDisabled(not config.check_feature(feature::body_tracking)); + ImGui::Indent(); + if (ImGui::Checkbox(_S("Enable lower body tracking"), &config.fb_lower_body)) + { + config.save(); + } + imgui_ctx->vibrate_on_hover(); + if (ImGui::IsItemHovered()) + imgui_ctx->tooltip(_("Estimate lower body joint positions using Generative Legs\nRequires 'Hand and body tracking' to be enabled in the Quest movement tracking settings")); - ImGui::Unindent(); - ImGui::EndDisabled(); + ImGui::BeginDisabled(not config.fb_lower_body); + if (ImGui::Checkbox(_S("Enable hip tracking"), &config.fb_hip)) + { + config.save(); + } + imgui_ctx->vibrate_on_hover(); + if (ImGui::IsItemHovered()) + imgui_ctx->tooltip(_("Only takes affect with lower body tracking enabled\nMay be desired when using another source of hip tracking")); + ImGui::EndDisabled(); + + ImGui::Unindent(); + ImGui::EndDisabled(); + } } {