added 'hud.inventory' binding
This commit is contained in:
@@ -106,4 +106,5 @@ void setup_bindings() {
|
|||||||
Events::bind(BIND_CAM_ZOOM, inputtype::keyboard, keycode::C);
|
Events::bind(BIND_CAM_ZOOM, inputtype::keyboard, keycode::C);
|
||||||
Events::bind(BIND_PLAYER_NOCLIP, inputtype::keyboard, keycode::N);
|
Events::bind(BIND_PLAYER_NOCLIP, inputtype::keyboard, keycode::N);
|
||||||
Events::bind(BIND_PLAYER_FLIGHT, inputtype::keyboard, keycode::F);
|
Events::bind(BIND_PLAYER_FLIGHT, inputtype::keyboard, keycode::F);
|
||||||
|
Events::bind(BIND_HUD_INVENTORY, inputtype::keyboard, keycode::TAB);
|
||||||
}
|
}
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#define BIND_CAM_ZOOM "camera.zoom"
|
#define BIND_CAM_ZOOM "camera.zoom"
|
||||||
#define BIND_PLAYER_NOCLIP "player.noclip"
|
#define BIND_PLAYER_NOCLIP "player.noclip"
|
||||||
#define BIND_PLAYER_FLIGHT "player.flight"
|
#define BIND_PLAYER_FLIGHT "player.flight"
|
||||||
|
#define BIND_HUD_INVENTORY "hud.inventory"
|
||||||
|
|
||||||
extern void setup_bindings();
|
extern void setup_bindings();
|
||||||
extern void setup_definitions();
|
extern void setup_definitions();
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ void HudRenderer::draw(const GfxContext& ctx){
|
|||||||
pauseMenu->visible(true);
|
pauseMenu->visible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Events::jpressed(keycode::TAB)) {
|
if (Events::jactive("hud.inventory")) {
|
||||||
if (!pause) {
|
if (!pause) {
|
||||||
inventoryOpen = !inventoryOpen;
|
inventoryOpen = !inventoryOpen;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user