MaxGUI - Managing lots of windows

BlitzMax Forums/BlitzMax Programming/MaxGUI - Managing lots of windows

siread(Posted 2006) [#1]
I've started writing New Star Soccer 4 using BlitzMax and MaxGUI. There will be quite a few windows to manage, maybe 20+ each with their own images and gadgets, many of which will display different data (teams, players etc) each time they are displayed.

I'm wondering whether I should simply create all the windows and gadgets globally when the program starts and update the data on them when they are displayed.

Or would it be more efficient to make each window it's own type that can be created on the fly, then destroyed when it's closed. Each window type would have it's own methods for populating the lists, labels and so on.

Maybe there's a better solution than either of these? I'm new to Max, so any help would be appreciated. Thanks. :)


Dreamora(Posted 2006) [#2]
I would use a Tabber and Panels to achieve such a behavior.

Multi-super-window chaos normally isn't that "intuitive" and casual players will most likely drop your app straight away.

But another question: Is it more a statistic type of game or more "game". For the later I wouldn't use MaxGUI but HighGUI for example which does GUI in the graphics window.


Each window type would have it's own methods for populating the lists, labels and so on.

If you have many lists, don't destroy the window but disable and hide them, because populating lists is still slow *at least I think so*


Gabriel(Posted 2006) [#3]
I do this with tabs and by hiding and showing anything which cannot be tabbed. I just think it's neater to have everything in memory than to be constantly creating and destroying, and making the GC work. Plus, as Dreamora says, there are a few other compelling reasons for not recreating. Plus it makes it easier when something you have open changes a gadget on a window which is not currently open. If you create and destroy on the fly, you have to store changes or check for them when recreating. Just seems messy to me.


siread(Posted 2006) [#4]
Thanks chaps. Sounds good because that's the way i've been going so far. :) It is a stat-heavy game but there will also be match action. I'm using iGlass at the moment which allows me to do everything in a graphics window. I'll take a look at HighGUI though. Are there any compelling reasons to choose one over the other? The one thing I really need is a listbox that does columns, but it looks like i'll have to work something else out for that.


Dreamora(Posted 2006) [#5]
My main reason is, that I already spent money on MaxGUI and thus am not that interested in spending money for a graphic based gui ... Although if HighGUI had a donation button I would definitely use it to send a few bucks over for that great work :-)