v0.8.1: added a keybind for resting

This commit is contained in:
Evan Debenham 2020-06-16 12:22:09 -04:00
parent 5049a9784f
commit d75fa20337
3 changed files with 16 additions and 0 deletions

View File

@ -72,6 +72,7 @@ windows.wndkeybindings.hero_info=Hero Info
windows.wndkeybindings.journal=Journal
windows.wndkeybindings.wait=Wait
windows.wndkeybindings.search=Search
windows.wndkeybindings.rest=Rest
windows.wndkeybindings.inventory=Inventory
windows.wndkeybindings.quickslot_1=Quickslot 1
windows.wndkeybindings.quickslot_2=Quickslot 2

View File

@ -46,6 +46,7 @@ public class SPDAction extends GameAction {
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");
@ -81,6 +82,7 @@ public class SPDAction extends GameAction {
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.I, SPDAction.INVENTORY );
defaultBindings.put( Input.Keys.Q, SPDAction.QUICKSLOT_1 );

View File

@ -100,6 +100,19 @@ public class Toolbar extends Component {
}
});
add(new Button(){
@Override
protected void onClick() {
examining = false;
Dungeon.hero.rest(true);
}
@Override
public GameAction keyAction() {
return SPDAction.REST;
}
});
add(btnSearch = new Tool(44, 0, 20, 26) {
@Override
protected void onClick() {