Page 1 of 1

Easy GUI System v4

Posted: Tue May 08, 2012 9:15 pm
by Trappingnoobs
Hey guys, haven't posted in a while, been working on a lot of other stuff.

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! :P) but I'll be making dropdown and slider within days.

Here's a screenshot:

Image


Release in a few weeks maximum.

Re: Easy GUI System v4

Posted: Wed May 09, 2012 3:32 pm
by josefnpat
Image

Re: Easy GUI System v4

Posted: Wed May 09, 2012 4:57 pm
by Trappingnoobs
Thanks for pointing that out, fixed it.

Re: Easy GUI System v4

Posted: Sat May 12, 2012 1:39 am
by rokit boy
nice!

Re: Easy GUI System v4

Posted: Sun May 13, 2012 2:03 pm
by poorenglish
cool