Ejemplo n.º 1
0
 /** {@inheritDoc} */
 @Override
 public void actionPerformed(ActionEvent ae) {
   doubleClickTimer.stop();
   Tile tile = canvas.convertToMapTile(centerX, centerY);
   if (canvas.getViewMode() == GUI.MOVE_UNITS_MODE) {
     // Clear goto order when active unit is on the tile
     Unit unit = canvas.getActiveUnit();
     if (unit != null && unit.getTile() == tile) {
       freeColClient.getInGameController().clearGotoOrders(unit);
       canvas.updateCurrentPathForActiveUnit();
     } else {
       if (tile != null && tile.hasSettlement()) {
         freeColClient.getGUI().showSettlement(tile.getSettlement());
         return;
       }
     }
   }
   freeColClient.getGUI().setSelectedTile(tile);
 }
Ejemplo n.º 2
0
 /**
  * Get the GUI.
  *
  * @return The GUI.
  */
 protected GUI getGUI() {
   return freeColClient.getGUI();
 }