mirror of https://github.com/wayvr-org/wayvr.git
Expose focused screen tuning in settings
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
b9f608169f
commit
6e535804b1
|
|
@ -223,6 +223,13 @@ enum SettingType {
|
|||
ClickFreezeTimeMs,
|
||||
Clock12h,
|
||||
DoubleCursorFix,
|
||||
FocusedScreenAssistX,
|
||||
FocusedScreenAssistY,
|
||||
FocusedScreenRotateAssistX,
|
||||
FocusedScreenRotateAssistY,
|
||||
FocusedScreenCurveX,
|
||||
FocusedScreenDistance,
|
||||
FocusedScreenScale,
|
||||
FocusFollowsMouseMode,
|
||||
HandsfreePointer,
|
||||
HideGrabHelp,
|
||||
|
|
@ -290,6 +297,13 @@ impl SettingType {
|
|||
pub fn mut_f32(self, config: &mut GeneralConfig) -> &mut f32 {
|
||||
match self {
|
||||
Self::UiAnimationSpeed => &mut config.ui_animation_speed,
|
||||
Self::FocusedScreenAssistX => &mut config.focused_screen_assist_x,
|
||||
Self::FocusedScreenAssistY => &mut config.focused_screen_assist_y,
|
||||
Self::FocusedScreenRotateAssistX => &mut config.focused_screen_rotate_assist_x,
|
||||
Self::FocusedScreenRotateAssistY => &mut config.focused_screen_rotate_assist_y,
|
||||
Self::FocusedScreenCurveX => &mut config.focused_screen_curve_x,
|
||||
Self::FocusedScreenDistance => &mut config.focused_screen_distance,
|
||||
Self::FocusedScreenScale => &mut config.focused_screen_scale,
|
||||
Self::UiGradientIntensity => &mut config.ui_gradient_intensity,
|
||||
Self::UiRoundMultiplier => &mut config.ui_round_multiplier,
|
||||
Self::ScrollSpeed => &mut config.scroll_speed,
|
||||
|
|
@ -372,6 +386,13 @@ impl SettingType {
|
|||
Self::ClickFreezeTimeMs => Ok("APP_SETTINGS.CLICK_FREEZE_TIME_MS"),
|
||||
Self::Clock12h => Ok("APP_SETTINGS.CLOCK_12H"),
|
||||
Self::DoubleCursorFix => Ok("APP_SETTINGS.DOUBLE_CURSOR_FIX"),
|
||||
Self::FocusedScreenAssistX => Err("Focused screen assist X"),
|
||||
Self::FocusedScreenAssistY => Err("Focused screen assist Y"),
|
||||
Self::FocusedScreenRotateAssistX => Err("Focused screen rotate assist X"),
|
||||
Self::FocusedScreenRotateAssistY => Err("Focused screen rotate assist Y"),
|
||||
Self::FocusedScreenCurveX => Err("Focused screen curve X"),
|
||||
Self::FocusedScreenDistance => Err("Focused screen distance"),
|
||||
Self::FocusedScreenScale => Err("Focused screen scale"),
|
||||
Self::FocusFollowsMouseMode => Ok("APP_SETTINGS.FOCUS_FOLLOWS_MOUSE_MODE"),
|
||||
Self::GridOpacity => Ok("APP_SETTINGS.GRID_OPACITY"),
|
||||
Self::HandsfreePointer => Ok("APP_SETTINGS.HANDSFREE_POINTER"),
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@ pub fn mount(mp: &mut MacroParams, parent: WidgetID) -> anyhow::Result<()> {
|
|||
options_slider_f32(mp, c, SettingType::ScrollSpeed, 0.1, 5.0, 0.1)?;
|
||||
options_slider_f32(mp, c, SettingType::LongPressDuration, 0.1, 2.0, 0.1)?;
|
||||
options_slider_f32(mp, c, SettingType::PointerLerpFactor, 0.1, 1.0, 0.1)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenDistance, 0.2, 2.0, 0.05)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenScale, 1.0, 2.5, 0.05)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenCurveX, 0.0, 0.8, 0.02)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenAssistX, 0.0, 0.75, 0.01)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenAssistY, 0.0, 0.85, 0.01)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenRotateAssistX, 0.0, 0.5, 0.01)?;
|
||||
options_slider_f32(mp, c, SettingType::FocusedScreenRotateAssistY, 0.0, 0.5, 0.01)?;
|
||||
options_slider_f32(mp, c, SettingType::XrClickSensitivity, 0.1, 1.0, 0.1)?;
|
||||
options_slider_f32(mp, c, SettingType::XrClickSensitivityRelease, 0.1, 1.0, 0.1)?;
|
||||
options_slider_i32(mp, c, SettingType::ClickFreezeTimeMs, 0, 500, 50)?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue