Tuesday, July 17, 2012

Editor Update!

Alright, so I've gotten my GUI editor working mostly.  Unfortunately the last couple of days have been devoted to other subjects, like cleaning the house, and homework, however I'm glad to say that the GUI Editor now saves all the data, adds new objects to a specific GUI, can create new GUI's, and can change the name of the GUI!  So kudos for me, but there's still much more to be done on it.

Also, I now have the code in for a checkbox.  Still working on getting it right, but for now it works like a charm.  The checkbox will be used for things like vertical sync, full screen, or other things...really simple on/off stuff that I'll add to the game.  I just need to get the GUI's made, which should now be MUCH easier.

One little thing I've run into though that I need to fix...I need to run multiple GUI's at the same time.  If I do this, I think I can just have a gui.add() function that adds another GUI on top of the one I already have, as a list, or stack...stack would probably be more efficient, because then I can just pop the last one, and it goes back to the original GUI.  The problem that may come in though is the layering...cause most of these objects work on a very limited amount of layers.  i.e. 0.8-1.0...where 1 is the very front, and 0 is the very back.

Anyway, so that means I'll probably have a few more methods in the GUI Manager, and remove the LoadGUI method, prolly just use gui.Push, gui.Pop, and gui.Clear methods.  Would make things a bit easier, and if I need to I can do some coding behind that.  This might also imply I have a stack of lists of GUI Objects...o.o  which is going to get confusing.  The update method will look something like this...

foreach(List<GUIObject> glst in guis){
foreach(GUIObject gobj in glst){
glst.update();
}
}

Where guis is the stack of lists.  Doesn't seem like it'll be much of a pain at least...I'm glad that C# containers, including arrays, allow foreach loops...makes things far easier to work with than having to use a regular loop.

Anyway, enjoy the music of the day, it's from one of my many favorite video games, Borderlands.  ^_^

No comments:

Post a Comment