@ReceiveEvent(components = ClientComponent.class)
 public void onTogglePause(PauseButton event, EntityRef entity) {
   if (event.getState() == ButtonState.DOWN) {
     nuiManager.toggleScreen("engine:pauseMenu");
     event.consume();
   }
 }
Example #2
0
 @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();
   }
 }