From: Erik V. <ev...@us...> - 2009-12-29 22:10:20
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17488/rails/ui/swing/hexmap Modified Files: GUIHex.java Log Message: Offboard value display made special throughout. This fixes display of offboard values for 1856 Goderich and 18EU Hamburg. Index: GUIHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUIHex.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** GUIHex.java 28 Dec 2009 14:52:05 -0000 1.32 --- GUIHex.java 29 Dec 2009 22:10:01 -0000 1.33 *************** *** 603,617 **** tt.append(" (").append(name).append(")"); } - // The next line is a temporary development aid, that can be removed - // later. - /* - * tt.append(" <small>(") .append(model.getX()) .append(",") - * .append(model.getY()) .append(")</small>"); - */ tt.append("<br><b>Tile</b>: ").append(currentTile.getId()); // TEMPORARY tt.append("<small> rot=" + currentTileOrientation + "</small>"); ! if (currentTile.hasStations()) { ! // for (Station st : currentTile.getStations()) Station st; int cityNumber; --- 603,621 ---- tt.append(" (").append(name).append(")"); } tt.append("<br><b>Tile</b>: ").append(currentTile.getId()); // TEMPORARY tt.append("<small> rot=" + currentTileOrientation + "</small>"); ! if (currentTile.getColourName().equalsIgnoreCase(Tile.RED_COLOUR_NAME)) { ! if (model.hasOffBoardValues()) { ! tt.append("<br>Offboard value "); ! tt.append(model.getCurrentOffBoardValue(hexMap.getPhase())).append(" ["); ! int[] values = model.getOffBoardValues(); ! for (int i = 0; i < values.length; i++) { ! if (i > 0) tt.append(","); ! tt.append(values[i]); ! } ! tt.append("]"); ! } ! } else if (currentTile.hasStations()) { Station st; int cityNumber; *************** *** 619,637 **** cityNumber = city.getNumber(); st = city.getRelatedStation(); ! tt.append("<br> ").append(st.getType()).append(" ").append( ! cityNumber) // .append("/").append(st.getNumber()) ! .append(" (").append(model.getConnectionString(cityNumber)).append( ! "): value "); ! if (model.hasOffBoardValues()) { ! tt.append(model.getCurrentOffBoardValue(hexMap.getPhase())).append(" ["); ! int[] values = model.getOffBoardValues(); ! for (int i = 0; i < values.length; i++) { ! if (i > 0) tt.append(","); ! tt.append(values[i]); ! } ! tt.append("]"); ! } else { ! tt.append(st.getValue()); ! } if (st.getBaseSlots() > 0) { tt.append(", ").append(st.getBaseSlots()).append(" slots"); --- 623,630 ---- cityNumber = city.getNumber(); st = city.getRelatedStation(); ! tt.append("<br> ").append(st.getType()).append(" ").append(cityNumber) ! .append(" (").append(model.getConnectionString(cityNumber)) ! .append("): value "); ! tt.append(st.getValue()); if (st.getBaseSlots() > 0) { tt.append(", ").append(st.getBaseSlots()).append(" slots"); |