I bet you were expecting good news now, but all I have is bad news today[depressed]. I managed to break my GUI system about 5 times today and now I have to totally rewrite part of it. The new Dialog class brought out a large problem with the system (which I had noticed before, but didn't realize it was going to be this much of a problem.) The problem is in the way that I handle events such as button pushes and such.
At the moment, each widget's input functions breakdown to something similar to this:
for(WidgetItor Itor = m_Children.begin(); Itor != m_Children.end(); ++Itor)
Obviously it's a little more complicated than that, but it's close. Anyway, when my WidgetManager's EventHandler() method recieves true, it returns the ID of the current widget and stops. The problem is that since the widgets are added as children to other widgets instead of the WidgetManager class, a Dialog box has no way of noting that one of it's children was activated, not the actual Dialog. So, I'm going to have to figure something out, most likely just modifying it so that it returns the child's ID instead of true/false.
I also made some changes to other things.
- the WidgetManager class is now a singleton
- the ListBox now takes up all of it's width when no scroll buttons are visible
- added the ability to disable widgets
- disabling a widget makes it's color change to 0xff808080 instead of 0xffffffff (half-grey instead of pure white.)
- Fixed some MORE sorting problems
- Fixed both the ListBox's problem when deleting items
- Fixed the ID problem (the one I was talking about above. I took a break from writing the entry.)
- Added skinless rendering to the Dialog class (so that it can be used to group chunks of widgets without being seen.)
- Added the ability to have a separate GuiEventHandler() that'll receive events and IDs.
There's a couple other things, I just can't think of them at the moment.
Time for bed now.