Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zeus_82

Pages: [1]
1
NGUI 3 Support / Re: How to pinch
« on: September 26, 2016, 07:50:47 AM »
TouchKit library is quite good and thorough for gesture work.
and it is free.

Can be found here: https://github.com/prime31/TouchKit


2
NGUI 3 Support / Re: Setting focus on input widget in code
« on: May 18, 2016, 04:58:01 PM »
UIInput.selected = true.

This would work in most of cases. But sometimes it would not work because it is called at the same frame when user tapped on other widget.
That's why you need to start a coroutine and invoke that line on next frame, something like this :
  1. IEnumerator DelayedSelectInput() {
  2.     yield return null;
  3.     uiInputInstance.isSelected = true;
  4. }

and invoke that coroutine from place of usage :
  1. StartCoroutine(DelayedSelectInput());

Hope this helps.

3
NGUI 3 Support / Re: Increase drag offset of scroll view
« on: November 24, 2014, 04:08:01 AM »
Any help ?

4
NGUI 3 Support / Increase drag offset of scroll view
« on: November 18, 2014, 01:57:25 AM »
Hi There,

I have scroll view, with the following go hierarchy:
ScrollView
     UIWrapContent - UICenterOnChild
          item1
          item2
          .
          item10

I want the scroll view to scroll too much on a small swipe in finger.
so that on a very small swipe by user, I want the scroll view to scroll to next item

Thanks for help.

5
NGUI 3 Support / Re: Assign EventDelegate and Parameters from script
« on: September 10, 2014, 01:39:18 AM »
Thank you both for the great help.

It worked.

EventDelegate eventDelegate = new EventDelegate(this, "TestMethod");
eventDelegate.parameters[0].value = 20;
button.GetComponent<UIButton>().onClick.Add( eventDelegate );

Although the argument would be null in the inspector, but the value is serialized and coupled
with the parameter.

:-)

6
NGUI 3 Support / Assign EventDelegate and Parameters from script
« on: September 09, 2014, 11:45:53 AM »
Hey guys,

I want to assign an EventDelegate to a UIButton in addition to parameters,
I know I can do this :
button.GetComponent<UIButton>().onClick.Add(new EventDelegate(targetGameObject, "MethodToCall"));

But, how can I add parameters ?
So, If the MethodToCall has 2 parameters, I can pass them.
Please, help.

Pages: [1]