void OnPress(GuiEventReceiver rcv, GuiTouchEventArg args) { if (args.State) { OnDrag(rcv, args); } }
void OnPress(GuiEventReceiver receiver, GuiTouchEventArg args) { if (!args.State) { ScrollView.Validate(); } }
void OnPress(GuiEventReceiver receiver, GuiTouchEventArg args) { if (!args.State) { ScrollView.Validate (); } }
void OnDrag(GuiEventReceiver receiver, GuiTouchEventArg args) { ScrollView.ScrollRelative (args.Delta); }
void OnDrag(GuiEventReceiver rcv, GuiTouchEventArg args) { var offset = _background.transform.InverseTransformPoint(args.WorldPosition).x / (float)_background.Width; Value = Mathf.Clamp(offset, -0.5f, 0.5f) + 0.5f; }
void OnBtnPressed(GuiEventReceiver sender, GuiTouchEventArg tea) { TweeningScale.Begin (gameObject, tea.State ? Vector3.one : ScaleOnPress, tea.State ? ScaleOnPress : Vector3.one, TweenTime); UpdateAttachedWidgets (tea.State ? ActiveColor : (enabled ? EnableColor : DisableColor), TweenTime); }
void OnPress(GuiEventReceiver rcv, GuiTouchEventArg args) { if (args.State) { OnDrag (rcv, args); } }
void OnDrag(GuiEventReceiver rcv, GuiTouchEventArg args) { var offset = _background.transform.InverseTransformPoint (args.WorldPosition).x / (float) _background.Width; Value = Mathf.Clamp (offset, -0.5f, 0.5f) + 0.5f; }
/// <summary> /// Raise OnPress event manually. /// </summary> /// <param name="tea">Tea.</param> public void RaisePressEvent(GuiTouchEventArg tea) { if (OnPress != null) { OnPress.Invoke (this, tea); } }
/// <summary> /// Raise OnDrag event manually. /// </summary> /// <param name="tea">Tea.</param> public void RaiseDragEvent(GuiTouchEventArg tea) { if (OnDrag != null) { OnDrag.Invoke (this, tea); } }
/// <summary> /// Raise OnClick event manually. /// </summary> /// <param name="tea">Tea.</param> public void RaiseClickEvent(GuiTouchEventArg tea) { if (OnClick != null) { OnClick.Invoke (this, tea); } }
void OnDrag(GuiEventReceiver receiver, GuiTouchEventArg args) { ScrollView.ScrollRelative(args.Delta); }
void OnBtnPressed(GuiEventReceiver sender, GuiTouchEventArg tea) { TweeningScale.Begin(gameObject, tea.State ? Vector3.one : ScaleOnPress, tea.State ? ScaleOnPress : Vector3.one, TweenTime); UpdateAttachedWidgets(tea.State ? ActiveColor : (enabled ? EnableColor : DisableColor), TweenTime); }