@ReceiveEvent(components = ClientComponent.class) public void onTogglePause(PauseButton event, EntityRef entity) { if (event.getState() == ButtonState.DOWN) { nuiManager.toggleScreen("engine:pauseMenu"); event.consume(); } }
@ReceiveEvent(components = ClientComponent.class, priority = EventPriority.PRIORITY_CRITICAL) public void onToggleConsole(ConsoleButton event, EntityRef entity) { if (event.getState() == ButtonState.DOWN) { nuiManager.toggleScreen("engine:console"); event.consume(); } }
@ReceiveEvent(components = ClientComponent.class) public void onToggleInventory(InventoryButton event, EntityRef entity) { if (event.getState() == ButtonState.DOWN) { nuiManager.toggleScreen("engine:inventoryScreen"); event.consume(); } }