Page 3 of 6
Re: LOVEly Eyes (GUI Toys) update of 2009-04-23
Posted: Fri Apr 24, 2009 1:25 am
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
- levelyeyes gradient fill.png (15.66 KiB) Viewed 4155 times
Re: LOVEly Eyes (GUI Toys) update of 2009-04-23
Posted: Fri Apr 24, 2009 10:08 am
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
Re: LOVEly Eyes (GUI Toys) update of 2009-04-23
Posted: Fri Apr 24, 2009 12:13 pm
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.
Re: LOVEly Eyes (GUI Toys) update of 2009-04-23
Posted: Fri Apr 24, 2009 8:28 pm
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.
Re: LOVEly Eyes (GUI Toys) update of 2009-04-23
Posted: Sat Apr 25, 2009 4:56 am
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
Re: LOVEly Eyes (GUI Toys) update of 2009-04-23
Posted: Sat Apr 25, 2009 9:04 am
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 .
- 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.
Re: LOVEly Eyes (GUI Toys) update of 2009-04-24
Posted: Sat Apr 25, 2009 1:25 pm
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
Re: LOVEly Eyes (GUI Toys) update of 2009-04-24
Posted: Sat Apr 25, 2009 3:36 pm
by Robin
Oy, yes, I completely forgot: I implemented the fix. Just forgot to upload it.
- edit.lua
- (9.27 KiB) Downloaded 194 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.
Re: LOVEly Eyes (GUI Toys) update of 2009-04-28
Posted: Tue Apr 28, 2009 3:15 am
by athanazio
exciting new features !
- new component button (athanazio)
. the base color of the button can be changed ...
- lovely buttons.png (6.64 KiB) Viewed 4114 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 ...
Re: LOVEly Eyes (GUI Toys) update of 2009-04-28
Posted: Tue Apr 28, 2009 11:37 am
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