Programming with OpenGL #8

Posted by Mordi on June 11, 2012, 12:32 p.m.

Since last time, I've done a lot of stuff. I now have a proper menu-system. Each menu is rendered to a rendertarget, so transitions are really easily done. I've also got a focus-system, where only one item can be interacted with at a time, and the currently focused item is both updated and drawn last. This is to ensure that you can't click two buttons at the same time, basically. Menus are also very easy to set up, since everything is done in one event. I do it in the state (or room, as it was called in GM) initialization function.

Only boxes and buttons so far. Going to add more stuff like sliders and content-boxes. I do have graphics for most of these things, as I did most of the items below in C# before. The UI is quite nifty texture-wise, since it's all baked into one tiny texture (65x56).

Here's a chart I made over all the items I plan to add:

It should be a versatile UI-system.

Comments

sirxemic 11 years, 10 months ago

MenuItem? More like UIItem, or Widget :P

Yeah, I can't really say much else about this…