down state of BasicButton

20 views
Skip to first unread message

XinRex

unread,
Oct 2, 2013, 2:25:10 PM10/2/13
to aw...@googlegroups.com
hi,

BasicButton.hx ,I add:

                if ( isOver && l_inputMouse.getIsButtonDown())
{
onDown();
}
in _updater( p_deltaTime:Int = 0 ) funciton.
.
and add function:
        public function onDown():Void {
setAgenda( EAgenda.SUB_TYPE( _HelperEState.OVER ) );
}
.
modify onClick() function like this:
public function onClick():Void
{
setAgenda( EAgenda.SUB_TYPE( _HelperEState.UP ) );// add this line.
if ( onClickCallback == null )
{
return;
}
Reflect.callMethod( this, onClickCallback, [] );
}

because,if the target is android,after button click,the button state can not reset to up state.I wish you have a better solution...:)


Rob Fell

unread,
Oct 2, 2013, 3:53:40 PM10/2/13
to aw...@googlegroups.com
 
Thanks, I hadn't encountered that but can see how a touch device wouldn't know about the roll out until another button is pressed.
I've committed the modification to the onClick function as revisions 600 & 601.
 
I am currently developing some touch methods to control the virtual Joypad.

XinRex

unread,
Oct 3, 2013, 2:55:34 PM10/3/13
to aw...@googlegroups.com
wow,so cool! My game will on mobile phone,so the gesture supports is good news.haha...
and I think mobile develop becomes more and more important for me.
awe6 will supports some action for target OS?
e.g. when push "Home","back","Vol up" or "Vol down" key on my phone,it can be response me some event?

在 2013年10月3日星期四UTC+8上午2时25分10秒,XinRex写道:
Reply all
Reply to author
Forward
0 new messages