EGS v2 - Screenshots! Redesign! (Easy GUI System)
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
main.lua tries to load an mp3 that isn't included with the source.
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
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 :-)
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
the outlines of the boxes are they made with lines, or is it just a bigger box below 'THE' box?
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
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?
edit- why does main.lua have to require Class.lua? Why isn't it done by the library modules that need it?
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
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.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?
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
@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().
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
Trappingnoobs,
yay i helped you
yay i helped you
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
OK, I guess I can I rename it to something else less generic then.Trappingnoobs wrote: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.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?
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.Trappingnoobs wrote: Dude to make them have random colors just change their BorderColor etc, here's some sample source:
Replace GiveTheme with this:
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.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
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: EGS v2 - Screenshots! Redesign! (Easy GUI System)
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.chrism wrote:OK, I guess I can I rename it to something else less generic then.Trappingnoobs wrote: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.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?
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.Trappingnoobs wrote: Dude to make them have random colors just change their BorderColor etc, here's some sample source:
Replace GiveTheme with this:
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.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
Who is online
Users browsing this forum: No registered users and 3 guests