From: Kimmo R. <ki...@us...> - 2013-05-09 09:54:00
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/entity In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4033/src/games/stendhal/client/entity Modified Files: RPEntity.java Log Message: bind hiding title to title change properties, instead of reading the RPObject at every screen draw Index: RPEntity.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/entity/RPEntity.java,v retrieving revision 1.305 retrieving revision 1.306 diff -C2 -d -r1.305 -r1.306 *** RPEntity.java 8 May 2013 15:29:42 -0000 1.305 --- RPEntity.java 9 May 2013 09:53:56 -0000 1.306 *************** *** 150,153 **** --- 150,155 ---- private boolean choking; + + private boolean showTitle = true; /** *************** *** 925,928 **** --- 927,931 ---- titleType = null; } + showTitle = !object.has("notitle"); initializeSounds(); *************** *** 1133,1136 **** --- 1136,1143 ---- fireChange(PROP_TITLE); } + if (changes.has("unnamed")) { + showTitle = false; + fireChange(PROP_TITLE); + } } *************** *** 1297,1300 **** --- 1304,1325 ---- } } + + /* + * Title + */ + if (changes.has("unnamed")) { + showTitle = true; + fireChange(PROP_TITLE); + } + } + + /** + * Check if the entity view should show the title. + * + * @return <code>true</code>, if the title should be displayed, + * <code>false</code> if it should be hidden + */ + public boolean showTitle() { + return showTitle; } |