[Picross-commit] SF.net SVN: picross: [60] trunk
Status: Pre-Alpha
Brought to you by:
yvan_norsa
From: <yva...@us...> - 2008-04-22 12:46:13
|
Revision: 60 http://picross.svn.sourceforge.net/picross/?rev=60&view=rev Author: yvan_norsa Date: 2008-04-22 05:46:19 -0700 (Tue, 22 Apr 2008) Log Message: ----------- loading screen Modified Paths: -------------- trunk/src/picross/PicrossController.java trunk/src/picross/PicrossMediator.java trunk/src/picross/game/random/RandomGameController.java trunk/src/picross/game/random/RandomGameMediator.java Added Paths: ----------- trunk/images/en/label-wait.png trunk/images/fr/label-wait.png trunk/src/picross/menus/WaitMenuMediator.java trunk/src/picross/menus/WaitMenuUI.java Added: trunk/images/en/label-wait.png =================================================================== (Binary files differ) Property changes on: trunk/images/en/label-wait.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/images/fr/label-wait.png =================================================================== (Binary files differ) Property changes on: trunk/images/fr/label-wait.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/src/picross/PicrossController.java =================================================================== --- trunk/src/picross/PicrossController.java 2008-04-22 12:23:45 UTC (rev 59) +++ trunk/src/picross/PicrossController.java 2008-04-22 12:46:19 UTC (rev 60) @@ -52,6 +52,8 @@ /** Random game command. */ public static final String RANDOM_GAME_CMD = "RANDOM_GAME_CMD"; + public static final String NEXT_RANDOM_GAME_CMD = "NEXT_RANDOM_GAME_CMD"; + /** Select level command. */ public static final String SELECT_LEVEL_CMD = "SELECT_LEVEL_CMD"; Modified: trunk/src/picross/PicrossMediator.java =================================================================== --- trunk/src/picross/PicrossMediator.java 2008-04-22 12:23:45 UTC (rev 59) +++ trunk/src/picross/PicrossMediator.java 2008-04-22 12:46:19 UTC (rev 60) @@ -56,6 +56,7 @@ import picross.menus.LevelMenuMediator; import picross.menus.MainMenuMediator; import picross.menus.MenuMediator; +import picross.menus.WaitMenuMediator; /** * Application mediator. @@ -106,16 +107,23 @@ } if (cmd.equals(PicrossController.RANDOM_GAME_CMD)) { + this.displayWaitScreen(); this.startRandomGame(); return; } + if (cmd.equals(PicrossController.NEXT_RANDOM_GAME_CMD)) { + this.startRandomGame(); + return; + } + if (cmd.equals(PicrossController.SELECT_LEVEL_CMD)) { this.displaySelectLevelMenu(); return; } if (cmd.equals(PicrossController.LEVEL_CMD)) { + this.displayWaitScreen(); this.startGame(e.getComment()); return; } @@ -150,6 +158,10 @@ this.displayMenu(LevelMenuMediator.class); } + private void displayWaitScreen() { + this.displayMenu(WaitMenuMediator.class); + } + /** * Helper method to display a menu. * Modified: trunk/src/picross/game/random/RandomGameController.java =================================================================== --- trunk/src/picross/game/random/RandomGameController.java 2008-04-22 12:23:45 UTC (rev 59) +++ trunk/src/picross/game/random/RandomGameController.java 2008-04-22 12:46:19 UTC (rev 60) @@ -1,7 +1,7 @@ /* * $Id$ * - * Copyright (c) 2007 + * Copyright (c) 2007-2008 * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, Modified: trunk/src/picross/game/random/RandomGameMediator.java =================================================================== --- trunk/src/picross/game/random/RandomGameMediator.java 2008-04-22 12:23:45 UTC (rev 59) +++ trunk/src/picross/game/random/RandomGameMediator.java 2008-04-22 12:46:19 UTC (rev 60) @@ -93,7 +93,7 @@ String cmd = e.getCommandName(); if (cmd.equals(RandomGameController.NEXT_CMD)) { - this.fireEventPerformed(PicrossController.RANDOM_GAME_CMD); + this.fireEventPerformed(PicrossController.NEXT_RANDOM_GAME_CMD); return; } Added: trunk/src/picross/menus/WaitMenuMediator.java =================================================================== --- trunk/src/picross/menus/WaitMenuMediator.java (rev 0) +++ trunk/src/picross/menus/WaitMenuMediator.java 2008-04-22 12:46:19 UTC (rev 60) @@ -0,0 +1,66 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.menus; + +import picross.PicrossException; +import picross.PicrossUI; + +/** + * @author Y. Norsa + */ +public class WaitMenuMediator extends MenuMediator { + /*** Constante ***/ + + /*** Champ statique ***/ + + /*** Champ ***/ + + /*** Constructeur ***/ + + /** + * Constructeur. + */ + public WaitMenuMediator(PicrossUI ui) throws PicrossException { + super(ui); + } + + /*** M\xE9thode ***/ + + protected MenuUI initView(PicrossUI ui, MenuController controller) + throws PicrossException { + + return new WaitMenuUI(); + } +} + Property changes on: trunk/src/picross/menus/WaitMenuMediator.java ___________________________________________________________________ Name: svn:keywords + Id Added: trunk/src/picross/menus/WaitMenuUI.java =================================================================== --- trunk/src/picross/menus/WaitMenuUI.java (rev 0) +++ trunk/src/picross/menus/WaitMenuUI.java 2008-04-22 12:46:19 UTC (rev 60) @@ -0,0 +1,68 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.menus; + +import javax.swing.ImageIcon; +import javax.swing.JLabel; + +import picross.Picross; + +/** + * @author Y. Norsa + */ +class WaitMenuUI extends MenuUI { + /*** Constante ***/ + static final long serialVersionUID = -6083373008192848638L; + + /*** Champ statique ***/ + + /*** Champ ***/ + + /*** Constructeur ***/ + + /** + * Constructeur. + */ + WaitMenuUI() { + super(); + + ImageIcon labelIcon = Picross.getLocalizedImage("label-wait.png"); + JLabel label = new JLabel(labelIcon); + label.setBorder(null); + label.setBounds(75, 225, + labelIcon.getIconWidth(), labelIcon.getIconHeight()); + this.add(label); + } +} + Property changes on: trunk/src/picross/menus/WaitMenuUI.java ___________________________________________________________________ Name: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |