From: Richard W. <rwa...@us...> - 2009-06-27 21:11:15
|
Update of /cvsroot/jogre/jogre/api/src/org/jogre/client/awt In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7689/src/org/jogre/client/awt Modified Files: JogreTitlePanel.java Log Message: Fix the new JogreTitlePanel to be better style. Index: JogreTitlePanel.java =================================================================== RCS file: /cvsroot/jogre/jogre/api/src/org/jogre/client/awt/JogreTitlePanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JogreTitlePanel.java 27 Jun 2009 19:49:30 -0000 1.2 --- JogreTitlePanel.java 27 Jun 2009 21:10:05 -0000 1.3 *************** *** 57,63 **** // Flags that indicate which parts of the title to draw. ! private int displayFlags = (DISPLAY_TITLE_IMAGE | DISPLAY_GAME_ICON); ! private static final int DISPLAY_TITLE_IMAGE = 1; ! private static final int DISPLAY_GAME_ICON = 2; /** --- 57,62 ---- // Flags that indicate which parts of the title to draw. ! private boolean displayTitleImage = true; ! private boolean displayGameIcon = true; /** *************** *** 97,101 **** setLayout(new TableLayout (sizes)); ! displayFlags = DISPLAY_TITLE_IMAGE; } else { // Show the game name & icon only --- 96,101 ---- setLayout(new TableLayout (sizes)); ! // Don't display the game icon ! displayGameIcon = false; } else { // Show the game name & icon only *************** *** 109,113 **** add (gameLabel, "0,0,l,b"); ! displayFlags = DISPLAY_GAME_ICON; } } --- 109,114 ---- add (gameLabel, "0,0,l,b"); ! // Don't the display the title image ! displayTitleImage = false; } } *************** *** 121,128 **** super.paintComponent(g); ! if ((displayFlags & DISPLAY_TITLE_IMAGE) != 0) { g.drawImage(GameImages.getImage("jogre.title"), 0, 0, null); } ! if ((displayFlags & DISPLAY_GAME_ICON) != 0) { g.drawImage(GameImages.getImage("game.title"), getWidth() - 55, 0, null); } --- 122,129 ---- super.paintComponent(g); ! if (displayTitleImage) { g.drawImage(GameImages.getImage("jogre.title"), 0, 0, null); } ! if (displayGameIcon) { g.drawImage(GameImages.getImage("game.title"), getWidth() - 55, 0, null); } |