EGS v2 - Screenshots! Redesign! (Easy GUI System)

Showcase your libraries, tools and other projects that help your fellow love users.
chrism
Prole
Posts: 21
Joined: Wed May 25, 2011 6:17 pm

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by chrism »

main.lua tries to load an mp3 that isn't included with the source. :?
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by Trappingnoobs »

chrism wrote:main.lua tries to load an mp3 that isn't included with the source. :?

I thought I uploaded a patch for that. One minute.

Edit

Patched :-)
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by GijsB »

the outlines of the boxes are they made with lines, or is it just a bigger box below 'THE' box?
chrism
Prole
Posts: 21
Joined: Wed May 25, 2011 6:17 pm

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by chrism »

Another small thing, there's no math.randomseed() so the colors are always the same.

edit- why does main.lua have to require Class.lua? Why isn't it done by the library modules that need it?
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by Trappingnoobs »

chrism wrote:Another small thing, there's no math.randomseed() so the colors are always the same.

edit- why does main.lua have to require Class.lua? Why isn't it done by the library modules that need it?
Because it can be used for other things I make and in the off chance somone uses two or more of things I make they only end up requiring it once.

Dude to make them have random colors just change their BorderColor etc, here's some sample source:

Replace GiveTheme with this:

Code: Select all

function giveTheme(element)
	element.toolTipVisible = true
	element.toolTipText = element.className..": "..element.name
	element.backgroundColor = {math.random(1,255),math.random(1,255),math.random(1,255)}
	element.borderColor = {math.random(1,255),math.random(1,255),math.random(1,255)}
end
Each element has loads of global properties and some properties only it has. Check out GUIClassDeclerations.lua and look at the properties. Those are in GUI elements. Don't change the ones in GUIClassDecleration though, unless you want all new GUIs to look like that.



@GijsBel

Oh. That'd've been an easier way to do it. At the moment I just draw 4 boxes at appropriate positions and sizes around it. Code is in GUIMain.lua in DrawBorder().
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by GijsB »

Trappingnoobs,

yay i helped you :neko:
chrism
Prole
Posts: 21
Joined: Wed May 25, 2011 6:17 pm

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by chrism »

Trappingnoobs wrote:
chrism wrote:Another small thing, there's no math.randomseed() so the colors are always the same.

edit- why does main.lua have to require Class.lua? Why isn't it done by the library modules that need it?
Because it can be used for other things I make and in the off chance somone uses two or more of things I make they only end up requiring it once.
OK, I guess I can I rename it to something else less generic then.
Trappingnoobs wrote: Dude to make them have random colors just change their BorderColor etc, here's some sample source:

Replace GiveTheme with this:

Code: Select all

function giveTheme(element)
	element.toolTipVisible = true
	element.toolTipText = element.className..": "..element.name
	element.backgroundColor = {math.random(1,255),math.random(1,255),math.random(1,255)}
	element.borderColor = {math.random(1,255),math.random(1,255),math.random(1,255)}
end
Each element has loads of global properties and some properties only it has. Check out GUIClassDeclerations.lua and look at the properties. Those are in GUI elements. Don't change the ones in GUIClassDecleration though, unless you want all new GUIs to look like that.
That's exactly what is already in your main.lua; what I was saying is that there is no math.randomseed() call in your main.lua, so the colors end up always being the same. It seemed to me like an small oversight and not exactly what you intended, that's all.
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)

Post by Trappingnoobs »

chrism wrote:
Trappingnoobs wrote:
chrism wrote:Another small thing, there's no math.randomseed() so the colors are always the same.

edit- why does main.lua have to require Class.lua? Why isn't it done by the library modules that need it?
Because it can be used for other things I make and in the off chance somone uses two or more of things I make they only end up requiring it once.
OK, I guess I can I rename it to something else less generic then.
Trappingnoobs wrote: Dude to make them have random colors just change their BorderColor etc, here's some sample source:

Replace GiveTheme with this:

Code: Select all

function giveTheme(element)
	element.toolTipVisible = true
	element.toolTipText = element.className..": "..element.name
	element.backgroundColor = {math.random(1,255),math.random(1,255),math.random(1,255)}
	element.borderColor = {math.random(1,255),math.random(1,255),math.random(1,255)}
end
Each element has loads of global properties and some properties only it has. Check out GUIClassDeclerations.lua and look at the properties. Those are in GUI elements. Don't change the ones in GUIClassDecleration though, unless you want all new GUIs to look like that.
That's exactly what is already in your main.lua; what I was saying is that there is no math.randomseed() call in your main.lua, so the colors end up always being the same. It seemed to me like an small oversight and not exactly what you intended, that's all.
It's only made to be an example, I'd expect people to edit it, because the outcome of that code will usualy be ugly anyway.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests