wayvr: space gravity: hide in openvr

This commit is contained in:
Aleksander 2026-05-31 10:01:39 +02:00
parent e1c7e5744f
commit 618bc8281c
2 changed files with 22 additions and 9 deletions

View File

@ -73,9 +73,10 @@
"LONG_PRESS_DURATION": "Long press duration", "LONG_PRESS_DURATION": "Long press duration",
"LOOK_AND_FEEL": "Look & Feel", "LOOK_AND_FEEL": "Look & Feel",
"MISC": "Miscellaneous", "MISC": "Miscellaneous",
"NO_SKYMAPS_FOUND": "No skymaps found",
"NOTIFICATIONS_ENABLED": "Enable notifications", "NOTIFICATIONS_ENABLED": "Enable notifications",
"NOTIFICATIONS_SOUND_ENABLED": "Notification sounds", "NOTIFICATIONS_SOUND_ENABLED": "Notification sounds",
"NOT_SUPPORTED": "Not supported",
"NO_SKYMAPS_FOUND": "No skymaps found",
"OPAQUE_BACKGROUND": "Opaque background", "OPAQUE_BACKGROUND": "Opaque background",
"OPTION": { "OPTION": {
"AUTO": "Automatic", "AUTO": "Automatic",

View File

@ -1,12 +1,16 @@
use wgui::{ use wgui::{
assets::AssetPath, assets::AssetPath,
i18n::Translation,
layout::{Layout, LayoutTask, WidgetID}, layout::{Layout, LayoutTask, WidgetID},
parser::{Fetchable, ParseDocumentParams}, parser::{Fetchable, ParseDocumentParams},
}; };
use crate::tab::settings::{ use crate::{
SettingType, SettingsMountParams, SettingsTab, tab::settings::{
macros::{options_category, options_checkbox, options_slider_f32}, SettingType, SettingsMountParams, SettingsTab,
macros::{options_category, options_checkbox, options_slider_f32},
},
util::wgui_simple,
}; };
pub struct State { pub struct State {
@ -62,7 +66,14 @@ impl State {
10.0, 10.0,
0.5, 0.5,
)?; )?;
}
if par.feats.monado {
// openvr can only ever rotate yaw
options_checkbox(par.mp, id_common_options_parent, SettingType::SpaceRotateUnlocked)?;
}
if par.feats.monado {
/* space gravity section */ /* space gravity section */
options_checkbox(par.mp, id_gravity_enabled_parent, SettingType::SpaceGravityEnabled)?; options_checkbox(par.mp, id_gravity_enabled_parent, SettingType::SpaceGravityEnabled)?;
@ -106,11 +117,12 @@ impl State {
5.0, 5.0,
0.1, 0.1,
)?; )?;
} } else {
wgui_simple::create_label(
if par.feats.monado { par.mp.layout,
// openvr can only ever rotate yaw id_gravity_enabled_parent,
options_checkbox(par.mp, id_common_options_parent, SettingType::SpaceRotateUnlocked)?; Translation::from_translation_key("APP_SETTINGS.NOT_SUPPORTED"),
)?;
} }
set_visible( set_visible(