I've been going through the source of my Easy GUI System v1 and v2 (And v3 which was never released AFAIR) and I was horrified at how many inefficiencies and just general ugly code I had. (Not so much v3).
And me and a friend are working on a project which is for now secret, and I needed to redesign it, this time I decided to use Kikito's Middleclass, which I must say was a much better choice than my previous (pathetic) class system I've been using.
I'm hoping to have a running beta with checkbox, slider, button, textbox, dropdown soon, then add scrollbars and more later.
This one runs off a central class called a GUIManager, which allows you to have seperate GUIs for each gamestate, for example:
menuState = class('menuState', gameState)
function menuState:initialize()
self.GUI = GUIManager:new()
local check1 = Checkbox:new(self.GUI)
end
function menuState:draw()
self.GUI:draw()
end
function menuState:update()
self.GUI:update()
end
This allows you to have multiple different states of GUI and only one (Or more?) showing at a time, which allows much easier game state switching.
It's much faster than previous versions, it is a lot more predictable, easy to use, and properties and events are named more straightforwardly.
As with all 3 other versions, the first things I made are Checkbox and Button (Because they're quickest and easiest!
![Razz :P](./images/smilies/ms-razz.png)
Here's a screenshot:
![Image](http://gyazo.com/faecaeacff21b02757a1a98aea3ebf98.png)
Release in a few weeks maximum.