From: Erik V. <ev...@us...> - 2009-11-25 18:48:29
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14410/rails/ui/swing Modified Files: ORUIManager.java GameUIManager.java GameSetupWindow.java Log Message: Better handling of load errors. If the game engine deems a move invalid, processing stops at that point, and play can be resumed from there. A sensible set of messages is displayed. Index: ORUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORUIManager.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ORUIManager.java 20 Nov 2009 20:56:50 -0000 1.33 --- ORUIManager.java 25 Nov 2009 18:48:19 -0000 1.34 *************** *** 890,894 **** exchangedTrain = oldTrains.get(index); } - } --- 890,893 ---- Index: GameSetupWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameSetupWindow.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GameSetupWindow.java 19 Nov 2009 20:48:53 -0000 1.17 --- GameSetupWindow.java 25 Nov 2009 18:48:19 -0000 1.18 *************** *** 207,210 **** --- 207,213 ---- DisplayBuffer.get(), "", JOptionPane.ERROR_MESSAGE); return; + } else if (DisplayBuffer.getSize() > 0) { + JOptionPane.showMessageDialog(this, + DisplayBuffer.get(), "", JOptionPane.ERROR_MESSAGE); } } Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** GameUIManager.java 21 Nov 2009 19:26:50 -0000 1.24 --- GameUIManager.java 25 Nov 2009 18:48:19 -0000 1.25 *************** *** 81,85 **** saveDateTimeFormat.setTimeZone(TimeZone.getTimeZone(timezone)); } ! saveSuffixSpec = Config.get("save.filename.suffix"); if (Util.hasValue(saveSuffixSpec) && !saveSuffixSpec.equals(NEXT_PLAYER_SUFFIX)) { saveSuffix = "_" + saveSuffixSpec; --- 81,85 ---- saveDateTimeFormat.setTimeZone(TimeZone.getTimeZone(timezone)); } ! saveSuffixSpec = Config.get("save.filename.suffix"); if (Util.hasValue(saveSuffixSpec) && !saveSuffixSpec.equals(NEXT_PLAYER_SUFFIX)) { saveSuffix = "_" + saveSuffixSpec; *************** *** 431,435 **** filename = saveDirectory + "/" + gameManager.getGameName() + "_" ! + saveDateTimeFormat.format(new Date()) + saveSuffix + "." + saveExtension; --- 431,435 ---- filename = saveDirectory + "/" + gameManager.getGameName() + "_" ! + saveDateTimeFormat.format(new Date()) + saveSuffix + "." + saveExtension; |