From: Erik V. <eri...@xs...> - 2012-01-27 20:56:36
|
OK, I have committed code that does the job of reordering player names in the GUI, as far as I have been able to test. The adaptability of player names is generic, but it is enabled on a per-game basis. This enabling is currently hardcoded (see below), but could be turned into an XML game property. Player reordering is now undoable as well. The UI name updates follow the standard Observer-based Model/ViewObject mechanism that is used for all UI updates. The commit text: Player captions made variable to reflect player reordering. Capability is game-dependent. Setting it is currently hardcoded in GameManager[_1880].setGuiParameters(). The list of players in GameManager is now an ArrayListState. As ArrayListState does not inherit from ModelObject, a separate StringState[] array had to be created to hold the player names for use in the GUI. A new Cell superclass for Caption and Field allows Field to get a caption background and also centralises highlighting. Erik. --------------------- From: Dr....@t-... [mailto:Dr....@t-...] Sent: Wednesday, January 25, 2012 10:02 PM To: Erik Vos Subject: Re: [Rails-devel] Fw: Re: Push Request : 1880 Code Update Part II Hi Erik, a number jump to my mind :) Problem 1: Based on the Fact that the PlayerOrder can change afte the outcome of the StartRound we need to have a flag to switch that order around and let the UI know that it needs to be aware of a new playerorder: Subsequently. 1. The upperPlayerCaption and lowerPlayerCaption need to be updated with the new player order. 2. the player related fields need to be updated also in new order. |