File tree 4 files changed +10
-0
lines changed
4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Version 3
10
10
* Added a debug TimeSequenceState that can pop-up a time sync debug display.
11
11
* Added "Resume" menu item to the In-Game menu.
12
12
* Added an in-game "Help" pop-up mapping to the F1 key.
13
+ * Added Gamepad mapping so "select" button will now open the in-game menu.
14
+ * Added Gamepad mapping so the HAT will strafe/elevate.
13
15
14
16
15
17
Version 2
Original file line number Diff line number Diff line change 37
37
package example ;
38
38
39
39
import com .jme3 .input .KeyInput ;
40
+ import com .simsilica .lemur .input .Button ;
40
41
import com .simsilica .lemur .input .FunctionId ;
41
42
import com .simsilica .lemur .input .InputMapper ;
42
43
@@ -61,6 +62,8 @@ public class MainGameFunctions {
61
62
public static void initializeDefaultMappings ( InputMapper inputMapper ) {
62
63
63
64
inputMapper .map (F_IN_GAME_MENU , KeyInput .KEY_ESCAPE );
65
+ inputMapper .map (F_IN_GAME_MENU , Button .JOYSTICK_SELECT ); // the normal one
66
+ inputMapper .map (F_IN_GAME_MENU , Button .JOYSTICK_BUTTON8 ); // just in case it's not a gamepad
64
67
inputMapper .map (F_IN_GAME_HELP , KeyInput .KEY_F1 );
65
68
66
69
inputMapper .map (F_TIME_DEBUG , KeyInput .KEY_F7 );
Original file line number Diff line number Diff line change @@ -93,13 +93,17 @@ public static void initializeDefaultMappings( InputMapper inputMapper ) {
93
93
inputMapper .map (F_STRAFE , Axis .JOYSTICK_LEFT_X );
94
94
inputMapper .map (F_STRAFE , KeyInput .KEY_D );
95
95
inputMapper .map (F_STRAFE , InputState .Negative , KeyInput .KEY_A );
96
+
97
+ inputMapper .map (F_STRAFE , Axis .JOYSTICK_HAT_X );
96
98
}
97
99
98
100
if ( !inputMapper .hasMappings (F_ELEVATE ) ) {
99
101
// Elevation only has key mappings but we still treat it like
100
102
// one "axis".
101
103
inputMapper .map (F_ELEVATE , KeyInput .KEY_Q );
102
104
inputMapper .map (F_ELEVATE , InputState .Negative , KeyInput .KEY_Z );
105
+
106
+ inputMapper .map (F_ELEVATE , Axis .JOYSTICK_HAT_Y );
103
107
}
104
108
105
109
if ( !inputMapper .hasMappings (F_X_ROTATE ) ) {
Original file line number Diff line number Diff line change 16
16
<Loggers >
17
17
<Logger name =" example" level =" DEBUG" />
18
18
<Logger name =" com.simsilica.sim" level =" TRACE" />
19
+ <!-- <Logger name="com.simsilica.lemur.input.InputMapper" level="TRACE"/> -->
19
20
<!-- <Logger name="com.simsilica.lemur.CallMethodAction" level="TRACE"/> -->
20
21
<Root level =" INFO" >
21
22
<AppenderRef ref =" RollingFile" />
You can’t perform that action at this time.
0 commit comments