## LOVEly Eyes (GUI Toys) update of 2009-06-26

Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-28

Naturally, you have no support for my keyboard, which makes it more broken than the previous version. Will take a look to see if I can submit the keyboard support.

On another note, for some reason, gradients don't seem to work on my Xubuntu system. Instead of the gradient fill, it's just the background. On WinXP, the gradients worked fine.

I have not tested the latest version on XP yet. Will do in a moment.

--- EDIT ---

I just tested on XP. The gradients work as expected. The dead key approach did work here, and I see what you meant by "not the correct width". The buttons worked great.
Just one tiny remark: I would find it more intuitive* if the button gradients would change only if the button is pushed, instead of changing whenever the mouse is over it. For the onmouseover gradient, I would pick either no change, or just highlighting.

*I misspelled that about ten times in a row before getting it right...
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-28

great idea about the button will change the border width in 1 point in order to highlight, I think will be enough,
and reverse the gradient only when the click happens.

aha ! will be great to have different keyboard supports !

later I will publish these changes, and the fix that I made for the keyboard
Nothing is simple but everything is possible.
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-28b

minor bug fixing

- character length in text,button,edit now can support chars from the Keyboard class
- changed button to reverse gradient only when it clicks
lovelyeyes_20090428b.love
Nothing is simple but everything is possible.
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-28b

Exellent . However, both dead keys and gradients do not work for me on Xubuntu. I have no idea why.
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-28b

hey masters of the universe any idea why the gradient dont work on Xubuntu ?
is a pretty simple code

Code: Select all

Gradient = {}

-- create the new text object

local me = {}
me.color1 = color1
me.color2 = color2
return me
end

self:vertical(x,y,w,h)
self:horizontal(x,y,w,h)
end
end

local currentColor = love.graphics.getColor()
local currentLine = love.graphics.getLineWidth()

love.graphics.setLineWidth(1)
love.graphics.setColor( self.color1 )

local red = self.color1:getRed()
local green = self.color1:getGreen()
local blue = self.color1:getBlue()

local x1 = x + w

local stepRed = ( self.color2:getRed() - self.color1:getRed() ) / h
local stepGreen = ( self.color2:getGreen() - self.color1:getGreen() ) / h
local stepBlue = ( self.color2:getBlue() - self.color1:getBlue() ) / h

for n=y+2, y+(h-3),1 do
love.graphics.setColor( red, green, blue )
love.graphics.line( x, n, x1, n )

red = red + stepRed
green = green + stepGreen
blue = blue + stepBlue
end

love.graphics.setColor( self.color2 )
love.graphics.line( x, y+h-2, x1, y+h-2 )
love.graphics.setColor( currentColor )
love.graphics.setLineWidth(currentLine)

end

local currentColor = love.graphics.getColor()
local currentLine = love.graphics.getLineWidth()

love.graphics.setLineWidth(1)
love.graphics.setColor( self.color1 )

local red = self.color1:getRed()
local green = self.color1:getGreen()
local blue = self.color1:getBlue()

local y1 = y + h

local stepRed = ( self.color2:getRed() - self.color1:getRed() ) / w
local stepGreen = ( self.color2:getGreen() - self.color1:getGreen() ) / w
local stepBlue = ( self.color2:getBlue() - self.color1:getBlue() ) / w

for n=x+2, x+(w-3),1 do
love.graphics.setColor( red, green, blue )
love.graphics.line( n, y, n, y1 )

red = red + stepRed
green = green + stepGreen
blue = blue + stepBlue
end

love.graphics.setColor( self.color2 )
love.graphics.line( x+w-2, y, x+w-2, y1 )
love.graphics.setColor( currentColor )
love.graphics.setLineWidth(currentLine)

end

Nothing is simple but everything is possible.
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

### Re: LOVEly Eyes (GUI Toys) yes we have roundbox

yes we have rounded boxes ...
just the polygon for now, but soon will become a Rectangle feature
lovelyeyes_20090429_yeswehaveroundbox.love
wow this is rounded.jpg (7.34 KiB) Viewed 1962 times
Nothing is simple but everything is possible.
farvardin
Party member
Posts: 164
Joined: Sat Jun 28, 2008 6:46 pm

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-29

we have so many usefull GUI now, I have no excuse to make a decent game!
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-29

farvardin wrote: we have so many usefull GUI now, I have no excuse to make a decent game!
Nothing is simple but everything is possible.
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

### Re: LOVEly Eyes (GUI Toys) i can see stars !!

aha !! regular polygon component !

things are getting very nice,
polygons and stars.png (57.18 KiB) Viewed 1940 times
still have some creppy behaviors on filling but the calculations are working, any suggestions why we have both problems ?
localyeyes_20090502.love
Nothing is simple but everything is possible.
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

### Re: LOVEly Eyes (GUI Toys) update of 2009-04-29

OK, still no gradients on ye old 'buntu. Other than that (and the odd color fill bug) it seems fine.

About that last one: I thought SDL could only handle polygons with up to six joints. I believe it's on this forum somewhere.