switching panels / screensets, non MaxGui

BlitzMax Forums/BlitzMax Beginners Area/switching panels / screensets, non MaxGui

Dezzo(Posted 2014) [#1]
I wand to create 2 screensets who have a different amount of buttons/rectangle objects.
These screensets can be switched by either key command or dedicated buttons.
The question: How can i switch between those " screensets ". What is the programmatic approach to this OOP Whise ?
As an example: creating n instances of a "Panel" class which draws n instances of rectangle objects for each panel and by pressing a key i can switch between those panels. Any advice would be great ! Thx


Derron(Posted 2014) [#2]
You need an variable holding the "active" panel.

if you switch the active panel, set the variable accordingly.

In your mainloop just update/draw the active panel-variable instead of either panel1 or panel2.


bye
Ron


Dezzo(Posted 2014) [#3]
Perfect. Thank you Derron !