From: Brett L. <wak...@gm...> - 2007-08-03 00:03:01
|
On Thu, 2007-08-02 at 23:33 +0200, Erik Vos wrote: > > > > We don't start the game with OK because the user may not be finished > > setting up their game. If I want to select my game options, then enter > > in the players names, that needs to be just as valid as > > entering player > > names then selecting game options. > > > > This is why I'd prefer to keep these things all in the same window. > > Changing the dialog (or having an extra dialog) isn't at all necessary > > and causes more problems with the UI than it solves. > > OK, I'll try to change it that way one of these days. > > First the functionality, then the beautification. Hmmm... I just took a deeper look at this. I now have a better understanding of why you took this approach. It looks like we've got some pretty fundamental design flaws in our initialization code. It seems that in order to get the variant options, we need to parse the game XML. We don't parse the game XML until we start a new game. We really don't want to start a new game just to read which variants exist, if any. So, it appears that we may need to refactor our initialization code a bit, or create a new interface to loading the XML properties. I think we might be able to get away with just creating an array of ComponentManagers, and read all of the Game.xmls on startup. This should give us all of the information we need to present the inital game information and game variant options. This would also allow us to add a property to define the number of minimum and maximum players, and have the Options() dialog dynamically add or subtract name boxes based on this data. Then, when the New Game button is clicked, we can just choose the proper ComponentManager from the array, and discard the rest. ---Brett. The last time I saw him he was walking down Lover's Lane holding his own hand. -- Fred Allen |