RepeatButton functionality with Unity 4.6 UI

Hi,

How can I make a button do something when user touches to a button for a period of time, like GUI.RepeatButton(); ?

I want to do this with new UI because it’s easy to make it aspect ratio and resolution independent. Thanks in advance.

override the function:
public virtual void OnPointerClick(PointerEventData eventData)

I don’t know how to do that. Also don’t know about either virtual keyword and events. Looks like advanced stuff. Thanks for the answer anyway.

Add an event trigger. Add listeners for on mouse up and on mouse down. Set you repeat button bool in those methods.

Thanks