@@ -58,26 +58,43 @@ impl Configure for PlayingAssets {
58
58
#[ derive( Actionlike , Reflect , Clone , Hash , PartialEq , Eq ) ]
59
59
pub enum PlayingAction {
60
60
Restart ,
61
+ Pause ,
62
+ // TODO: These actions should be split out.
63
+ // TODO: Discard action.
61
64
AddCard ,
62
65
SelectCardRight ,
63
66
SelectCardLeft ,
64
67
SwapCardLeft ,
65
68
SwapCardRight ,
66
69
AcceptDeckChanges ,
67
- // TODO: Pause
68
70
}
69
71
70
72
impl Configure for PlayingAction {
71
73
fn configure ( app : & mut App ) {
72
74
app. init_resource :: < ActionState < Self > > ( ) ;
73
75
app. insert_resource (
74
76
InputMap :: default ( )
77
+ . insert ( Self :: Restart , GamepadButtonType :: Select )
75
78
. 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 )
81
98
. insert ( Self :: AddCard , KeyCode :: KeyL )
82
99
. build ( ) ,
83
100
) ;
0 commit comments