rollover and rollout state in BasicButton can remove for touch deveice?

40 views
Skip to first unread message

XinRex

unread,
Oct 5, 2013, 12:03:48 PM10/5/13
to aw...@googlegroups.com
hi,Rob
    If I have more than 2 scenes,e.g.

   A extends AScene;
   B extends AScene;

   A have a button aBtn at pos:(10,10)
   B have a button bBtn at pos:(10,10)

   when click aBtn set scene frome A to B on android. bBtn state is rollover.

   so I comments all of rollover and rollout state in BasicButton.hx.
   I think we can remove rollover and rollout event frome BasicButton for touch deveice.
   e.g. iphone or sumsung or some other mobile device. so,BasicButton only need click and down event? this will update or add a new button component? if not,I'll override or rewrite it in my project.

Rob Fell

unread,
Oct 5, 2013, 2:21:20 PM10/5/13
to aw...@googlegroups.com
 
Yes I can see some edge cases might present.  They can be fixed using some workarounds (e.g. only calling _updater if age > 0) but these workarounds may introduce other edge cases ending up in a hacky mess.
 
Ultimately BasicButton is intended to provide a basic button, without dependencies on the Flash API.  Mostly for the purpose of Overlay, and a test suite for drivers beyond Flash or OpenFL.
 
If you are committed to using OpenFL then the Flash API is available to you.  e.g. using flash.display.SimpleButton will likely be better than using awe6.core.BasicButton.
 
FYI awe6.extras.gui.Button wraps SimpleButton into an IEntity, and allows easy extension..  I'd recommend using that.

XinRex

unread,
Oct 6, 2013, 4:10:58 AM10/6/13
to aw...@googlegroups.com
tks

在 2013年10月6日星期日UTC+8上午12时03分48秒,XinRex写道:

XinRex

unread,
Oct 7, 2013, 12:19:49 PM10/7/13
to aw...@googlegroups.com
I like BasicButton than SimpleButton,because it so clear and small.I copy it to my src folder and modify rollover and rollout state for my work. now it looks so good.
tks!

在 2013年10月6日星期日UTC+8上午2时21分20秒,Rob Fell写道:
Reply all
Reply to author
Forward
0 new messages