[GH-ISSUE #4637] UI: Slider keyboard navigation and mouse wheel adjustment parity #1405

Closed
opened 2026-11-02 15:46:42 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @elythepreciouscat on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4637

🤖 Filed by elythepreciouscat's AI agent (Antigravity), not by elythepreciouscat personally.

Description

In Vanilla Minecraft (Java Edition 26.3):

  • Sliders (AbstractSliderButton / OptionInstance$OptionInstanceSliderButton) can be controlled via keyboard:
    • When focused with Tab or mouse click, canChangeValue is active.
    • Left / Right Arrow keys step slider values (discrete integer steps for discrete options, continuous nudging 1.0 / (width - 8.0) for continuous values).
    • Space / Enter toggles canChangeValue activation mode; when false, arrow keys navigate focus between widgets instead of modifying the value.
    • Escape cancels canChangeValue mode before closing the options screen.
    • Mouse wheel scrolling over a slider steps its value.
    • Visual parity: track is highlighted only when focused and !canChangeValue (or dragging); handle is highlighted when hovered or canChangeValue.
  • In Horizon:
    • Sliders in Options, Video Settings, and Horizon Graphics (GraphicsUi) could not be adjusted with arrow keys or mouse wheel.
    • Keyboard navigation (Tab / Shift+Tab, Arrow keys) was missing or did not handle slider activation states.
    • Horizon Graphics settings (GraphicsUi) and Extras switches did not support keyboard navigation or mouse wheel cycling.

Proposed Fix

  • Implement can_change_value state, discrete/continuous stepping, and keyboard navigation parity across options_ui.rs, graphics_ui.rs, and dialog sliders.
  • Support mouse wheel scrolling on sliders and cycle buttons.
  • Update slider rendering to match vanilla highlighted track / handle state rules.
Originally created by @elythepreciouscat on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4637 > 🤖 Filed by elythepreciouscat's AI agent (Antigravity), not by elythepreciouscat personally. ### Description In Vanilla Minecraft (Java Edition 26.3): - Sliders (`AbstractSliderButton` / `OptionInstance$OptionInstanceSliderButton`) can be controlled via keyboard: - When focused with `Tab` or mouse click, `canChangeValue` is active. - Left / Right Arrow keys step slider values (discrete integer steps for discrete options, continuous nudging `1.0 / (width - 8.0)` for continuous values). - Space / Enter toggles `canChangeValue` activation mode; when false, arrow keys navigate focus between widgets instead of modifying the value. - Escape cancels `canChangeValue` mode before closing the options screen. - Mouse wheel scrolling over a slider steps its value. - Visual parity: track is highlighted only when focused and `!canChangeValue` (or dragging); handle is highlighted when hovered or `canChangeValue`. - In Horizon: - Sliders in Options, Video Settings, and Horizon Graphics (`GraphicsUi`) could not be adjusted with arrow keys or mouse wheel. - Keyboard navigation (`Tab` / `Shift+Tab`, Arrow keys) was missing or did not handle slider activation states. - Horizon Graphics settings (`GraphicsUi`) and Extras switches did not support keyboard navigation or mouse wheel cycling. ### Proposed Fix - Implement `can_change_value` state, discrete/continuous stepping, and keyboard navigation parity across `options_ui.rs`, `graphics_ui.rs`, and dialog sliders. - Support mouse wheel scrolling on sliders and cycle buttons. - Update slider rendering to match vanilla highlighted track / handle state rules.
Author
Owner

@elythepreciouscat commented on GitHub (Oct 30, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6532297123 --> @elythepreciouscat commented on GitHub (Oct 30, 2026): 🤖 Agent: /claim
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2026):

🤖 Claims: refused, You hold 5 open issues: finish or /unclaim one first. (asked by @elythepreciouscat)

<!-- gh-comment-id:6532300186 --> @github-actions[bot] commented on GitHub (Oct 30, 2026): 🤖 Claims: refused, You hold 5 open issues: finish or `/unclaim` one first. (asked by @elythepreciouscat)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1405
No description provided.