Skip to content

Commit 02be65d

Browse files
committed
Adjust controls a bit
1 parent 588abad commit 02be65d

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

src/screen/playing.rs

+23-6
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,43 @@ impl Configure for PlayingAssets {
5858
#[derive(Actionlike, Reflect, Clone, Hash, PartialEq, Eq)]
5959
pub enum PlayingAction {
6060
Restart,
61+
Pause,
62+
// TODO: These actions should be split out.
63+
// TODO: Discard action.
6164
AddCard,
6265
SelectCardRight,
6366
SelectCardLeft,
6467
SwapCardLeft,
6568
SwapCardRight,
6669
AcceptDeckChanges,
67-
// TODO: Pause
6870
}
6971

7072
impl Configure for PlayingAction {
7173
fn configure(app: &mut App) {
7274
app.init_resource::<ActionState<Self>>();
7375
app.insert_resource(
7476
InputMap::default()
77+
.insert(Self::Restart, GamepadButtonType::Select)
7578
.insert(Self::Restart, KeyCode::KeyR)
76-
.insert(Self::SelectCardLeft, KeyCode::BracketLeft)
77-
.insert(Self::SelectCardRight, KeyCode::BracketRight)
78-
.insert(Self::SwapCardLeft, KeyCode::Comma)
79-
.insert(Self::SwapCardRight, KeyCode::Period)
80-
.insert(Self::AcceptDeckChanges, KeyCode::Space)
79+
.insert(Self::Pause, GamepadButtonType::Start)
80+
.insert(Self::Pause, KeyCode::Escape)
81+
.insert(Self::Pause, KeyCode::Tab)
82+
.insert(Self::Pause, KeyCode::KeyP)
83+
.insert(Self::SelectCardLeft, GamepadButtonType::DPadLeft)
84+
.insert(Self::SelectCardLeft, GamepadButtonType::LeftTrigger)
85+
.insert(Self::SelectCardLeft, KeyCode::KeyA)
86+
.insert(Self::SelectCardLeft, KeyCode::ArrowLeft)
87+
.insert(Self::SelectCardRight, GamepadButtonType::DPadRight)
88+
.insert(Self::SelectCardRight, GamepadButtonType::RightTrigger)
89+
.insert(Self::SelectCardRight, KeyCode::KeyD)
90+
.insert(Self::SelectCardRight, KeyCode::ArrowRight)
91+
.insert(Self::SwapCardLeft, GamepadButtonType::LeftTrigger2)
92+
.insert_modified(Self::SwapCardLeft, Modifier::Shift, KeyCode::KeyA)
93+
.insert_modified(Self::SwapCardLeft, Modifier::Shift, KeyCode::ArrowLeft)
94+
.insert(Self::SwapCardRight, GamepadButtonType::RightTrigger2)
95+
.insert_modified(Self::SwapCardRight, Modifier::Shift, KeyCode::KeyD)
96+
.insert_modified(Self::SwapCardRight, Modifier::Shift, KeyCode::ArrowRight)
97+
.insert(Self::AcceptDeckChanges, KeyCode::Enter)
8198
.insert(Self::AddCard, KeyCode::KeyL)
8299
.build(),
83100
);

0 commit comments

Comments
 (0)