2D Toolkit Forum

2D Toolkit => Support => Topic started by: quangtu89 on August 22, 2013, 02:46:41 am

Title: i want tk2dUIItem release dont fire event OnClick
Post by: quangtu89 on August 22, 2013, 02:46:41 am
My scene can drag to change scene .
I want to when i touch down a button after i move finger to drag scene, button will release but don't fire event OnClick

My code :

Code: [Select]
[AddComponentMenu("Lunge Mine/UI/UIWithDragScene")]
public class UIWithDragScene : tk2dUIBaseItemControl {

void Update()
{
if(uiItem.IsPressed)
{
if(LGController.state == LGController.State.Animation)
{
uiItem.Release();
}
}
}
}

How can i release a uiitem but don't fire event OnClick
Title: Re: i want tk2dUIItem release dont fire event OnClick
Post by: unikronsoftware on August 22, 2013, 10:05:19 am
So do you want it to fire or not? You are saying it doesn't fire the OnClick, and then you're asking the same question about how to do what you've already got again?
Title: Re: i want tk2dUIItem release dont fire event OnClick
Post by: quangtu89 on August 23, 2013, 07:13:05 am
I say I want to don't fire on click