Easy GUI System v4

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Easy GUI System v4

Post 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.
Last edited by Trappingnoobs on Wed May 09, 2012 4:57 pm, edited 1 time in total.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Easy GUI System v4

Post by josefnpat »

Image
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: Easy GUI System v4

Post by Trappingnoobs »

Thanks for pointing that out, fixed it.
User avatar
rokit boy
Party member
Posts: 198
Joined: Wed Jan 18, 2012 7:40 pm

Re: Easy GUI System v4

Post by rokit boy »

nice!
u wot m8
poorenglish
Prole
Posts: 47
Joined: Thu Sep 24, 2009 1:49 pm

Re: Easy GUI System v4

Post by poorenglish »

cool
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests