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

athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

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

current version :
lovelyeyes_20090926.love
previous version :
localyeyes_20090503.love
hands on : athanazio, robin, bartbes, YOU !!

release notes 2009-06-26
- add example to handle the sprite
know issue with the examples - in a random order some examples crash

release notes
2009-05-03
- fixed the gradient fill of the stars
- fixed the solid color fill of the stars
know issue of not dragging polygons, must check on onDragging from Rectangle

features
components
• rectangle
• button component
• text component with multilanguage support (en_US pt_BR)
• text edit with multilanguage keyboard support (en_US pt_BR)
• polygon triangle
• regular polygon more than 4 sides
• star with 5 or more points
• sprite
general features
• fill control
• border control
• transparent components
• draggable components
• mouse events : onMouseOver, onMouseOut, onClick, onMousePressed, onMouseReleased
• group of components
• save the current x,y of the components ina .lua file - this is cool
• horizontal and vertical gradient fill of any component
• set of NMSColors
• polygon calculation (roundbox)
• 17 examples of code

next steps

- add text input with fixed width / height
. scroll box

- create the dialog concept
. enhance the scene to have relative coordinates and use this as dialog
. create simple dialogs as :
. confirm

- list

- start to record small tutorial

- create a talk ballon component,
would be a text with a border
+ a little triangle at the bottom,
os just 2 lines for the borders anda fill of a triangle to connect to the text area .. =)

- volume component (like the vimeo.com video player)

. format the link with a different color and different cursor when mouse over and add the possible events
. onMouseOver
. onClick
. onMouseOut

- checkbox

cheers
Last edited by athanazio on Mon Sep 28, 2009 1:50 pm, edited 21 times in total.
Nothing is simple but everything is possible.
Sparx
Party member
Posts: 125
Joined: Thu Apr 02, 2009 9:54 am
Location: Aachen, Germany

Re: LOVEly Eyes (GUI Toys)

First thing I try:

scene.lua:29: attempt to call method "click" (a nil value)

this is while klicking the big thing in the middle
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

Re: LOVEly Eyes (GUI Toys)

hahaha great ! the hours over the code made me blind for this one =P

thx
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)

- fixed the stupid bug of dont check if the event handler of click exist in the object that is tested. -------- thx Sparx ! =)

- propagate some methods from Rectangle to child classes without rewrite
that was cool to understand how lua works in order to propagate the search for the elements of the prototype, after some reading about the metamodels and the usage of __index as a function I was able make it work,

the code in Text was something like this

Code: Select all

Text.__index = function (table, key)
if Text[key] ~= nil then
return Text[key]
else
return Rectangle[key]
end
end

I know that I can do better code than this, but for now this one works and prove the concept. probably something like one attribute for the current class and another with the mother class and read it from table parameter ... whatever... will test during the week

-- next steps --
- add some cool stuff like, text input (wow this will be real FUN)
- add a button, will try to implement on cute one that I made in Java in the past http://www.athanazio.com/2005/08/04/ger ... de-botoes/
. I believe a good approach for button if revert the current color of the button when pressed
- gauge component ---> want to use to control the volume of the scissor game
- drag stuff on the screen =) I like this hehehehe
- today I tought about create a talk ballon component, would be a text with a border + a little triangle at the bottom, os just 2 lines for the borders anda fill of a triangle to connect to the text area .. =)

cheers
lovelyeyes_20090413.love
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 cant resist I have to post my toughts about the ballon component
ballon_component_draft.jpg (22.29 KiB) Viewed 6304 times
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)

- add dragging support to all objects
(*) still with a bug to allow Text to be draggable without the forcedragging

- to help organize the objects in the screen, created an attribute in the Scene
to forcedragging that enable dragging of all the components, and then you can call dump() that will create an .lua file with the position where the components are, something like this

scene:getbyid("text1").x = 300
scene:getbyid("text1").y = 100
scene:getbyid("rec2").x = 470
scene:getbyid("rec2").y = 47
scene:getbyid("rec1").x = 471
scene:getbyid("rec1").y = 186

- some initial tests of using the label with click action as button

----------- next steps ----------
- add text input (wow this will be real FUN)
- add a button, use text with the effect on click toreverse the color for a moment to give feedback of the click
- create a talk ballon component, would be a text with a border + a little triangle at the bottom, os just 2 lines for the borders anda fill of a triangle to connect to the text area .. =)

- gauge component ---> want to use to control the volume of the scissor game
- volume component like the vimeo.com video player

cheers
lovelyeyes_20090415.love
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)

ok ok I couldnt sleep well with that stuff wrong ... =)

- fixed the dragging issue of text (hurray!)
- sort the NmsColors in the lua code
- can use dump() for a scene or for an individual object to create a file
with code setting the current position of the object, for one object would be :

text6 = Text:new("text6",583,323,"alone person")

or for multiples (dump from a scene)

rec2 = Rectangle:new("rec2",94,155,50,50)
text1 = Text:new("text1",52,336,"L\nL\nL\nL\nL\nL\nL\noren Ipsum\nMorer sdf sdfff")

- the dump of Text components support \n and \t
- some initial tests of using the label with click action as button

----------- next steps ----------
- add text input (wow this will be real FUN)
- add a button, use text with the effect on click toreverse the color for a moment to give feedback of the click
- create a talk ballon component, would be a text with a border + a little triangle at the bottom, os just 2 lines for the borders anda fill of a triangle to connect to the text area .. =)

- gauge component ---> want to use to control the volume of the scissor game
- volume component like the vimeo.com video player

cheers
lovelyeyes_20090415a.love
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)

working on the requestFocus and change focus ,,, preparation to the edit component =)
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)

new features !!

- with the attribute hasFocus define which component can have focus
- canHaveFocus define if will participate in the focus cycle
- focusFillColor, default white, is the focus border color
- focusFillBorder, default 2, is the focus border width

- dont forget to test the dump() feature !! =)

----------- next steps ----------
- cycle around the focus with arrows : up+/down- left-/right+
create a menu to show the use
- scrool box

- create more organized example applications,
with separated contexts and tests, documenting in the example with a text block, with the used code
- start to record small tutorial

- add a button, use text with the effect on click to reverse the color for a moment to give feedback of the click
- create a talk ballon component, would be a text with a border + a little triangle at the bottom, os just 2 lines for the borders anda fill of a triangle to connect to the text area .. =)
- volume component like the vimeo.com video player

cheers
lovelyeyes_20090417.love
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-20

2009-04-20

no new features =)
just refactoring and organization of the samples ...