Skip to content

Commit

Permalink
chore: update keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenMian committed Jan 14, 2024
1 parent 87124be commit 8ac1413
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A sokoban with a solver.
| Click `Left` on player reachable area | Move the character to this position |
| Click `Left` on a crate | Show the reachable area of the crate |
| Click `Left` on crate reachable area | Push the selected crate to this position |
| Hold `Right` and drag | Drag the board |
| Hold `Right` and drag | Adjust viewport |
| Click `Button 4` | Undo last push |
| Click `Button 5` | Redo last push |
| Scroll `Middle` | Zoom in/out |
Expand All @@ -45,7 +45,6 @@ A sokoban with a solver.
| Key | Action |
|-----------------|-----------------------------------|
| `H`/`J`/`K`/`L` | Move the character |
| `[`/`]` | Switch to the previous/next level |
| `U` | Undo last push |
| `Ctrl` + `R` | Redo last push |

Expand All @@ -58,7 +57,8 @@ A sokoban with a solver.
| `B`/`Circle` | Undo last push |
| `A`/`Cross` | Redo last push |
| `LT`/`RT` | Zoom in/out |
| Right stick | Move viewport |
| Right stick | Adjust viewport |
| `X`/`Square` | Trigger instant move[^1] |
| `Y`/`Triangle` | Automatic solution |

[^1]: Turn off character and crates movement animations.
4 changes: 4 additions & 0 deletions src/systems/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ impl Action {
UserInput::Single(InputKind::GamepadButton(GamepadButtonType::RightTrigger2)),
Self::ZoomIn,
),
(
UserInput::Single(InputKind::GamepadButton(GamepadButtonType::West)),
Self::InstantMove,
),
(
UserInput::Single(InputKind::GamepadButton(GamepadButtonType::North)),
Self::AutomaticSolution,
Expand Down

0 comments on commit 8ac1413

Please sign in to comment.