From 6e43767e382bdf173ee2ed8383936196d1aeda81 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 22 Jun 2022 23:02:36 -0400 Subject: [PATCH] v1.3.0: added some additional key bindings text for controller users --- .../assets/messages/windows/windows.properties | 6 ++++++ .../windows/WndKeyBindings.java | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index 7865cff5c..c9325b503 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -98,6 +98,7 @@ windows.wndjournal$guidetab$guideitem.missing=page missing windows.wndjournal$notestab.keys=Keys windows.wndjournal$notestab.landmarks=Landmarks +windows.wndkeybindings.controller_info=The left stick moves your character\nThe right stick controls an on-screen pointer windows.wndkeybindings.ttl_action=Action windows.wndkeybindings.ttl_key1=Key 1 windows.wndkeybindings.ttl_key2=Key 2 @@ -116,7 +117,9 @@ windows.wndkeybindings.journal=Journal windows.wndkeybindings.wait=Wait windows.wndkeybindings.examine=Examine windows.wndkeybindings.rest=Rest +windows.wndkeybindings.inventory_selector=Inventory Selector windows.wndkeybindings.inventory=Inventory +windows.wndkeybindings.quickslot_selector=Quickslot Selector windows.wndkeybindings.quickslot_1=Quickslot 1 windows.wndkeybindings.quickslot_2=Quickslot 2 windows.wndkeybindings.quickslot_3=Quickslot 3 @@ -134,7 +137,9 @@ windows.wndkeybindings.tag_action=Special Action windows.wndkeybindings.tag_loot=Pickup Item windows.wndkeybindings.tag_resume=Resume Motion windows.wndkeybindings.zoom_in=Zoom In +windows.wndkeybindings.zoom_in_and_scroll=Zoom In / Scroll Up windows.wndkeybindings.zoom_out=Zoom Out +windows.wndkeybindings.zoom_out_and_scroll=Zoom Out / Scroll Down windows.wndkeybindings.n=Go North windows.wndkeybindings.e=Go East windows.wndkeybindings.s=Go South @@ -143,6 +148,7 @@ windows.wndkeybindings.ne=Go NE windows.wndkeybindings.se=Go SE windows.wndkeybindings.sw=Go SW windows.wndkeybindings.nw=Go NW +windows.wndkeybindings.cur=Wait / Pickup Item windows.wndkeybindings$wndchangebinding.desc_first=Press a key to change the first key binding for: _%s_. windows.wndkeybindings$wndchangebinding.desc_second=Press a key to change the second key binding for: _%s_. windows.wndkeybindings$wndchangebinding.desc_third=Press a key to change the third key binding for: _%s_. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndKeyBindings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndKeyBindings.java index 0976a444d..8ea22cfd6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndKeyBindings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndKeyBindings.java @@ -120,6 +120,20 @@ public class WndKeyBindings extends Window { add(scrollingList); int y = 0; + + if (controller){ + RenderedTextBlock controllerInfo = PixelScene.renderTextBlock(Messages.get(this, "controller_info"), 6); + controllerInfo.maxWidth(WIDTH); + controllerInfo.setPos(0, 2); + controllerInfo.hardlight(TITLE_COLOR); + bindingsList.add(controllerInfo); + y = (int)controllerInfo.bottom()+3; + + ColorBlock sep = new ColorBlock(WIDTH, 1, 0xFF222222); + sep.y = y; + bindingsList.add(sep); + } + for (GameAction action : GameAction.allActions()){ //start at 1. No bindings for NONE if (action.code() < 1) continue;