Controllers: gilrs input layer, in-game movement, camera, actions and hotbar
Vanilla 26.3 has no gamepad input, so this is Horizon's own, on Bedrock's default layout (docs/controllers.md). gilrs reads the pads; the pure part (bindings, radial deadzones, the look curve, button edges, the horizon-controller.txt settings file) is in gamepad.rs with unit tests. Buttons act as the vanilla key mapping they're bound to, through the same path a rebound keyboard key takes (the keyboard's post-rebinding handling moves into Game::mapped_key). The left stick is an analog move vector, the right stick turns the view per frame, LB/RB step the hotbar, B and Start leave screens and A respawns. horizon-ctl pad injects a virtual pad. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,9 +22,9 @@ jobs:
|
||||
python tools/check_public_tree.py --history
|
||||
- name: Test offline research tooling
|
||||
run: python -m unittest discover -s tests -v
|
||||
- name: Install Rust toolchain and the ALSA headers the client's audio links against
|
||||
- name: Install Rust toolchain and the ALSA and udev headers the client links against
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev
|
||||
sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev
|
||||
rustup toolchain install stable --profile minimal --component rustfmt --component clippy
|
||||
- name: Check formatting and lint
|
||||
run: |
|
||||
|
||||
@@ -41,8 +41,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
run: rustup toolchain install stable --profile minimal
|
||||
- name: ALSA headers
|
||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev
|
||||
- name: ALSA and udev headers
|
||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev
|
||||
- name: Build the client
|
||||
run: cargo +stable build --release --locked -p horizon-client --bin horizon-client --bin horizon-ctl -p horizon-prepare
|
||||
- name: Standard loader and libraries only
|
||||
|
||||
Reference in New Issue
Block a user