diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java index a1a307fb3..e1d16f86d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java @@ -41,12 +41,15 @@ public class SPDAction extends GameAction { public static final GameAction BACK = GameAction.BACK; //-- - public static final GameAction HERO_INFO = new SPDAction("hero_info"); - public static final GameAction JOURNAL = new SPDAction("journal"); - + public static final GameAction N = new SPDAction("n"); + public static final GameAction W = new SPDAction("w"); + public static final GameAction S = new SPDAction("s"); + public static final GameAction E = new SPDAction("e"); + public static final GameAction NW = new SPDAction("nw"); + public static final GameAction NE = new SPDAction("ne"); + public static final GameAction SW = new SPDAction("sw"); + public static final GameAction SE = new SPDAction("se"); public static final GameAction WAIT = new SPDAction("wait"); - public static final GameAction SEARCH = new SPDAction("search"); - public static final GameAction REST = new SPDAction("rest"); public static final GameAction INVENTORY = new SPDAction("inventory"); public static final GameAction QUICKSLOT_1 = new SPDAction("quickslot_1"); @@ -56,68 +59,77 @@ public class SPDAction extends GameAction { public static final GameAction QUICKSLOT_5 = new SPDAction("quickslot_5"); public static final GameAction QUICKSLOT_6 = new SPDAction("quickslot_6"); + public static final GameAction SEARCH = new SPDAction("search"); + public static final GameAction REST = new SPDAction("rest"); + public static final GameAction TAG_ATTACK = new SPDAction("tag_attack"); public static final GameAction TAG_DANGER = new SPDAction("tag_danger"); public static final GameAction TAG_ACTION = new SPDAction("tag_action"); public static final GameAction TAG_LOOT = new SPDAction("tag_loot"); public static final GameAction TAG_RESUME = new SPDAction("tag_resume"); + public static final GameAction HERO_INFO = new SPDAction("hero_info"); + public static final GameAction JOURNAL = new SPDAction("journal"); + public static final GameAction ZOOM_IN = new SPDAction("zoom_in"); public static final GameAction ZOOM_OUT = new SPDAction("zoom_out"); - public static final GameAction N = new SPDAction("n"); - public static final GameAction E = new SPDAction("e"); - public static final GameAction S = new SPDAction("s"); - public static final GameAction W = new SPDAction("w"); - public static final GameAction NE = new SPDAction("ne"); - public static final GameAction SE = new SPDAction("se"); - public static final GameAction SW = new SPDAction("sw"); - public static final GameAction NW = new SPDAction("nw"); - private static final LinkedHashMap defaultBindings = new LinkedHashMap<>(); static { - defaultBindings.put( Input.Keys.ESCAPE, SPDAction.BACK ); - defaultBindings.put( Input.Keys.BACKSPACE, SPDAction.BACK ); + defaultBindings.put( Input.Keys.ESCAPE, SPDAction.BACK ); + defaultBindings.put( Input.Keys.BACKSPACE, SPDAction.BACK ); - defaultBindings.put( Input.Keys.H, SPDAction.HERO_INFO ); - defaultBindings.put( Input.Keys.J, SPDAction.JOURNAL ); + defaultBindings.put( Input.Keys.W, SPDAction.N ); + defaultBindings.put( Input.Keys.A, SPDAction.W ); + defaultBindings.put( Input.Keys.S, SPDAction.S ); + defaultBindings.put( Input.Keys.D, SPDAction.E ); + defaultBindings.put( Input.Keys.Q, SPDAction.NW ); + defaultBindings.put( Input.Keys.E, SPDAction.NE ); + defaultBindings.put( Input.Keys.Z, SPDAction.SW ); + defaultBindings.put( Input.Keys.C, SPDAction.SE ); + defaultBindings.put( Input.Keys.X, SPDAction.WAIT ); - defaultBindings.put( Input.Keys.SPACE, SPDAction.WAIT ); - defaultBindings.put( Input.Keys.S, SPDAction.SEARCH ); - defaultBindings.put( Input.Keys.Z, SPDAction.REST ); + defaultBindings.put( Input.Keys.NUMPAD_8, SPDAction.N ); + defaultBindings.put( Input.Keys.NUMPAD_4, SPDAction.W ); + defaultBindings.put( Input.Keys.NUMPAD_2, SPDAction.S ); + defaultBindings.put( Input.Keys.NUMPAD_6, SPDAction.E ); + defaultBindings.put( Input.Keys.NUMPAD_7, SPDAction.NW ); + defaultBindings.put( Input.Keys.NUMPAD_9, SPDAction.NE ); + defaultBindings.put( Input.Keys.NUMPAD_1, SPDAction.SW ); + defaultBindings.put( Input.Keys.NUMPAD_3, SPDAction.SE ); + defaultBindings.put( Input.Keys.NUMPAD_5, SPDAction.WAIT ); - defaultBindings.put( Input.Keys.I, SPDAction.INVENTORY ); - defaultBindings.put( Input.Keys.NUM_1, SPDAction.QUICKSLOT_1 ); - defaultBindings.put( Input.Keys.NUM_2, SPDAction.QUICKSLOT_2 ); - defaultBindings.put( Input.Keys.NUM_3, SPDAction.QUICKSLOT_3 ); - defaultBindings.put( Input.Keys.NUM_4, SPDAction.QUICKSLOT_4 ); - defaultBindings.put( Input.Keys.NUM_5, SPDAction.QUICKSLOT_5 ); - defaultBindings.put( Input.Keys.NUM_6, SPDAction.QUICKSLOT_6 ); + defaultBindings.put( Input.Keys.UP, SPDAction.N ); + defaultBindings.put( Input.Keys.LEFT, SPDAction.W ); + defaultBindings.put( Input.Keys.DOWN, SPDAction.S ); + defaultBindings.put( Input.Keys.RIGHT, SPDAction.E ); - defaultBindings.put( Input.Keys.A, SPDAction.TAG_ATTACK ); - defaultBindings.put( Input.Keys.TAB, SPDAction.TAG_DANGER ); - defaultBindings.put( Input.Keys.D, SPDAction.TAG_ACTION ); - defaultBindings.put( Input.Keys.ENTER, SPDAction.TAG_LOOT ); - defaultBindings.put( Input.Keys.T, SPDAction.TAG_RESUME ); + defaultBindings.put( Input.Keys.T, SPDAction.INVENTORY ); + defaultBindings.put( Input.Keys.I, SPDAction.INVENTORY ); + defaultBindings.put( Input.Keys.NUM_1, SPDAction.QUICKSLOT_1 ); + defaultBindings.put( Input.Keys.NUM_2, SPDAction.QUICKSLOT_2 ); + defaultBindings.put( Input.Keys.NUM_3, SPDAction.QUICKSLOT_3 ); + defaultBindings.put( Input.Keys.NUM_4, SPDAction.QUICKSLOT_4 ); + defaultBindings.put( Input.Keys.NUM_5, SPDAction.QUICKSLOT_5 ); + defaultBindings.put( Input.Keys.NUM_6, SPDAction.QUICKSLOT_6 ); - defaultBindings.put( Input.Keys.PLUS, SPDAction.ZOOM_IN ); - defaultBindings.put( Input.Keys.EQUALS, SPDAction.ZOOM_IN ); - defaultBindings.put( Input.Keys.MINUS, SPDAction.ZOOM_OUT ); + defaultBindings.put( Input.Keys.G, SPDAction.SEARCH ); + defaultBindings.put( Input.Keys.B, SPDAction.REST ); - defaultBindings.put( Input.Keys.UP, SPDAction.N ); - defaultBindings.put( Input.Keys.RIGHT, SPDAction.E ); - defaultBindings.put( Input.Keys.DOWN, SPDAction.S ); - defaultBindings.put( Input.Keys.LEFT, SPDAction.W ); + defaultBindings.put( Input.Keys.R, SPDAction.TAG_ATTACK ); + defaultBindings.put( Input.Keys.CONTROL_LEFT, SPDAction.TAG_ATTACK ); + defaultBindings.put( Input.Keys.TAB, SPDAction.TAG_DANGER ); + defaultBindings.put( Input.Keys.F, SPDAction.TAG_ACTION ); + defaultBindings.put( Input.Keys.V, SPDAction.TAG_LOOT ); + defaultBindings.put( Input.Keys.ENTER, SPDAction.TAG_LOOT ); + defaultBindings.put( Input.Keys.SPACE, SPDAction.TAG_RESUME ); - defaultBindings.put( Input.Keys.NUMPAD_5, SPDAction.WAIT ); - defaultBindings.put( Input.Keys.NUMPAD_8, SPDAction.N ); - defaultBindings.put( Input.Keys.NUMPAD_9, SPDAction.NE ); - defaultBindings.put( Input.Keys.NUMPAD_6, SPDAction.E ); - defaultBindings.put( Input.Keys.NUMPAD_3, SPDAction.SE ); - defaultBindings.put( Input.Keys.NUMPAD_2, SPDAction.S ); - defaultBindings.put( Input.Keys.NUMPAD_1, SPDAction.SW ); - defaultBindings.put( Input.Keys.NUMPAD_4, SPDAction.W ); - defaultBindings.put( Input.Keys.NUMPAD_7, SPDAction.NW ); + defaultBindings.put( Input.Keys.H, SPDAction.HERO_INFO ); + defaultBindings.put( Input.Keys.J, SPDAction.JOURNAL ); + + defaultBindings.put( Input.Keys.PLUS, SPDAction.ZOOM_IN ); + defaultBindings.put( Input.Keys.EQUALS, SPDAction.ZOOM_IN ); + defaultBindings.put( Input.Keys.MINUS, SPDAction.ZOOM_OUT ); } public static LinkedHashMap getDefaults() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 630b9ad95..7ecd8c3e6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -195,6 +195,28 @@ public class WelcomeScene extends PixelScene { text.setPos((w - text.width()) / 2f, (topRegion + 2) + (textSpace - text.height())/2); add(text); + if (previousVersion <= 593){ + //TODO translate! + add(new WndHardNotification(Icons.get(Icons.INFO), + "Key Bindings", + "Shattered Pixel Dungeon's default keybindings have changed based on early demo feedback!\n\n" + + "Here's a quick summary of what's been adjusted:\n" + + "_-_ The WASD and QEZC keys are now used for movement\n" + + "_-_ Quickslots now use the number keys\n" + + "_-_ Several game action bindings have been moved to the right of WASD\n" + + "_-_ Inventory bags can now be tabbed through with F1-F5\n" + + "_-_ Other binding (including numpad and arrow keys to move) are unchanged." + + "Please let me know if these new bindings work well for you, I am open to further adjustments. All keybinds can still be customized via the settings menu.", + Messages.get(this, "continue"), + 2){ + @Override + public void hide() { + super.hide(); + ShatteredPixelDungeon.resetScene(); + } + }); + } + } private void placeTorch( float x, float y ) {