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

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
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-23

Post by athanazio »

yes we have tasty new features
and some bug fixing
thanks Robin and bartbes !

- text editor
- backspace bug at the first char fixed
- fixed the local data = string.char(key) sleepy bug hehehe

- add Gradient fill ( look at example 12)

- refactor to change name of Scene to Group
lovelyeyes_20090423.love
(18.72 KiB) Downloaded 183 times
levelyeyes gradient fill.png
levelyeyes gradient fill.png (15.66 KiB) Viewed 4149 times
Nothing is simple but everything is possible.
User avatar
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-23

Post by athanazio »

Robin,
what you think on writing a small test case to test the Edit component ?
as you did so good job testing hehehe would be nice to have a cookbook to follow
when testing new versions again, doing like this we can make sure i don't break anything with sleepy code :)

cheers
Nothing is simple but everything is possible.
User avatar
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-23

Post by Robin »

Tried the new version, and the gradients work fine, as far as I can tell.

I just noticed a few issues with the Edit component:

1) Pressing Shift+1 gives 1, Shift+/ gives /, you get the point. There are several other small things with Shift and CAPS-LOCK that I fixed as well.
2) PageUp and PageDown cause errors. I added them to the list of ignored keys.
3) the Macro key apparently results into <. Nobody uses it, and returning < is unexpected. I put it on the ignore list.

I fixed these in this file:
edit.lua
Fixed Edit.lua
(8.53 KiB) Downloaded 177 times
By the way, what do you want in the test case?

EDIT: P.S.: I think that Shift+1 etc are layout specific. If anyone knows how to get the keyboard layout in LÖVE/Lua, please tell me.
Help us help you: attach a .love.
User avatar
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-23

Post by athanazio »

great Robin !
will commit to subversion later and release a version

and in the tests I believe we could have a list of scenarios to test, like
press Home = move the cursor to the first position
press Delete at the first char = delete it and move the chars on the right
press Delete at the last char = nothing

and so on so others can test and help to validate.
Nothing is simple but everything is possible.
User avatar
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-23

Post by athanazio »

changes made by Robin
http://love2d.org/forum/viewtopic.php?f ... t=20#p6495

- included the windows key and context menu key in the ignore list
lovelyeyes_20090424.love
(20.04 KiB) Downloaded 228 times
Nothing is simple but everything is possible.
User avatar
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-23

Post by Robin »

athanazio wrote:included the windows key and context menu key in the ignore list
Ah. I forgot about those.

Further, I have found this:
  • The Insert, Pause/Break and Print Screen keys should probably also be ignored.
  • If someone is mad enough to press Num Lock, Scroll Lock or use the Num Pad, they will get an error as well.
  • Using the Mute key gives a 'd' for some reason :death:.
  • Using the right Windows key still gives an error to me.
Maybe it would be more efficient to just have a table of keys that do return a character. (Or using pcall(), so that users at least don't get all those error messages when pressing an unexpected key.)

On the test case: ok, I'll do that.
Help us help you: attach a .love.
User avatar
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-24

Post by athanazio »

I run in the ignore list direction with the expectation to grab the extended chars from
another languages keyboards, anyone can test if its working properly with extended chars ?

- lets see if I can shoot some other components this weekend.
Robin if you have some time, do you mind on changing the edit.lua to reflect the changes you said ?

cheers
Nothing is simple but everything is possible.
User avatar
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-24

Post by Robin »

Oy, yes, I completely forgot: I implemented the fix. Just forgot to upload it.
edit.lua
(9.27 KiB) Downloaded 193 times
And on the extended keys: you mean like é, ø and ß? I had already tested that, but it doesn't support dead keys or Alt Gr.
Help us help you: attach a .love.
User avatar
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

Post by athanazio »

exciting new features !

- new component button (athanazio)
. the base color of the button can be changed ...
lovely buttons.png
lovely buttons.png (6.64 KiB) Viewed 4108 times

- more bug fixing in the edit component (robin/athanazio)

- new Keyboard layout pt_BR implemented (athanazio)
. still in tests, the calculation of the char width seems to be
reason of the current strange behavior ...
lovelyeyes_20090428.love
(22.47 KiB) Downloaded 171 times
Nothing is simple but everything is possible.
User avatar
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

Post by athanazio »

I believe I found the bug about the extended chars,
the Font:getWidth was not calculating the correct width for chars like "ç" and "ã"
so I add a conversion table to the Keyboard and if the component has a Keyboard layout set
will use it to calculate the correct width

this is the table used

Code: Select all

Keyboard.pt_BR.width = { 
	['á'] = 'a', 
	['ã'] = 'a', 
	['é'] = 'e', 
	['ê'] = 'e', 
	['í'] = 'i', 
	['ó'] = 'o', 
	['ú'] = 'u', 
	['ç'] = 'c', 
	['Á'] = 'A', 
	['Ã'] = 'A', 
	['É'] = 'E', 
	['Ê'] = 'E', 
	['Í'] = 'I', 
	['Ó'] = 'O', 
	['Ú'] = 'U', 
	['Ç'] = 'C', 
}
later I will realease a new version with everything together, the width and the changes need to Text and Edit
meanwhile if anybody wants to add another keyboard layouts would be great !!

just take a look at the code below

cheers
keyboard.lua
(1.25 KiB) Downloaded 191 times
Nothing is simple but everything is possible.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests