diff --git a/crates/horizon-client/src/game/pad_menu.rs b/crates/horizon-client/src/game/pad_menu.rs index f6afe37ba..3e8895aa5 100644 --- a/crates/horizon-client/src/game/pad_menu.rs +++ b/crates/horizon-client/src/game/pad_menu.rs @@ -263,6 +263,18 @@ impl Game<'_> { self.pad_take_pointer(event_loop); return; } + // With A held (a slider grabbed, a drag), the D-pad nudges instead. + if self.pad.menu.held[0] { + let (dx, dy) = match button { + Button::DPadLeft => (-2.0, 0.0), + Button::DPadRight => (2.0, 0.0), + Button::DPadUp => (0.0, -2.0), + _ => (0.0, 2.0), + }; + let at = self.cursor; + self.pad_pointer_to(event_loop, (at.0 + dx, at.1 + dy)); + return; + } let from = self.cursor; let targets = self.pad_targets(); if let Some(i) = gamepad::focus_step(from, button, &targets) { diff --git a/crates/horizon-client/src/ui.rs b/crates/horizon-client/src/ui.rs index 77243c6be..301620c9c 100644 --- a/crates/horizon-client/src/ui.rs +++ b/crates/horizon-client/src/ui.rs @@ -283,6 +283,10 @@ pub fn slider( hover: bool, active: bool, ) { + if active { + // A controller's D-pad can focus it (Horizon's controller support). + crate::widgets::target([x, y, w, 20.0]); + } let track = if hover && active { "gui/sprites/widget/slider_highlighted" } else { diff --git a/docs/controllers.md b/docs/controllers.md index 74aea46da..31f3b304a 100644 --- a/docs/controllers.md +++ b/docs/controllers.md @@ -82,7 +82,7 @@ and Java's controller mods do), not focus navigation: (half stack / place one), Y = quick move (shift-click), B = back / close. - LB / RB switch creative tabs and recipe book pages; right stick scrolls (creative grid, lists, chat). -- Sliders: A grabs, the stick or D-pad left/right moves, A releases. +- Sliders: hold A on the slider and move the stick, or nudge with the D-pad. - Text fields: the Steam Deck's keyboard (Steam + X) types into them like a real keyboard. Other platforms have no on-screen keyboard yet; text input needs a keyboard.