Ejemplo n.º 1
0
 @NiftyEventSubscriber(pattern = ".*")
 public void checkBoxStateChange(final String id, final CheckBoxStateChangedEvent stateChanged) {
   if (id.equals("pathingCheckBox")) {
     PathingRenderer pathingRenderer = Main.app.getStateManager().getState(PathingRenderer.class);
     pathingRenderer.setDisplayToggle(pathingCheckBox.isChecked());
   } else if (id.equals("litSurfacesCheckBox")) {
     MapRenderer mapRenderer = Main.app.getStateManager().getState(MapRenderer.class);
     mapRenderer.setSunnyRendering(litSurfacesCheckBox.isChecked());
   } else if (id.equals("terrainCheckBox")) {
     TerrainRenderer terrainRenderer = Main.app.getStateManager().getState(TerrainRenderer.class);
     terrainRenderer.setTerrainRendering(terrainCheckBox.isChecked());
   }
 }
Ejemplo n.º 2
0
 public void onAction(String name, boolean keyPressed, float tpf) {
   if (keyPressed) {
     if (name.equals("PathingRenderToggle")) {
       pathingCheckBox.toggle();
     } else if (name.equals("TerrainRenderToggle")) {
       terrainCheckBox.toggle();
     } else if (name.equals("SunnyRenderToggle")) {
       litSurfacesCheckBox.toggle();
     } else if (name.equals("ReduceDetailLevel")) {
       TerrainRenderer terrainRenderer =
           Main.app.getStateManager().getState(TerrainRenderer.class);
       terrainRenderer.changeLevelofDetal(1);
     } else if (name.equals("IncreeseDetailLevel")) {
       TerrainRenderer terrainRenderer =
           Main.app.getStateManager().getState(TerrainRenderer.class);
       terrainRenderer.changeLevelofDetal(-1);
     }
   }
 }