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 - Cheong

Pages: [1]
1
NGUI 3 Support / NGUI scroll view: Springs Issue
« on: September 30, 2015, 10:31:27 PM »
Dear Readers,

I have scroll view UI created using NGUI tools referring to NGUI sample scenes. In my scene, the first UI child object under scroll view did not bounce back to the original position (bounce back only a little) when the drag is over the top limit. Same goes to last child UI object. Is there any tips to resolve this? Any help would be appreciated.

Thanks.

2
Ngui version of 3.9.2 , using Windows OS7, Unity 5.2.0p1.

Done reading the code at line 663. Any customization to the code needed to enable hiding the mobile keyboard automatically and enabling another mobile keyboard when another input field is touched?

Thanks.

3
NGUI 3 Support / Re: Add Child On UIGrid problem: Arrangement is wrong
« on: September 22, 2015, 10:41:06 PM »
Ok, just saw this replies recently... not sure why I didn't noticed.
Problem solved btw, Thanks!

4
Hi readers,

There is an app that requires me to have login function...
But there is a problem that cause the app to be imperfect  :(

When I try to type-in the username for the login page, the mobile keyboard pop up for the username (works in expectation).
But when I try to click on the password text field, it did not pop up mobile keyboard for the password directly (oh.. no :( ).
Instead, the click on the password text field just performs closing the mobile keyboard for the username.
So the result is that it requires user to click the password text field 2 times/click anywhere before clicking the password text field when trying to key-in password.

Is there any way to solve this? Am I doing it wrong?

Thanks.

5
NGUI 3 Support / Add Child On UIGrid problem: Arrangement is wrong
« on: September 10, 2015, 02:58:11 AM »
Hi readers,

I am using NGUItools.AddChild(Parent, Prefab).

But when I was trying to add prefabs into the parent with array conditions, the arrangement seems to go wrong(the last object was added into the parent first instead of the first object).

Here the example code of how I do it:

public GameObject parent;
public GameObject prefab;

for(int i = 0; i<TotalNumberOfObjects; i++)
{
NGUItools.AddChild(parent,prefab);
prefab.name = "Object" + i;
}

The list of the prefabs added into the parent are as listed such as below:
1.)Object5;
2.)Object1;
3.)Object2;
4.)Object3;
5.)Object4;

Can you help me resolve this? Am I doing something wrong instead?

Thanks.

6
Thanks very much, devomage.

The code worked.
Here's the update:

   void Start () {
            button = transform.FindChild("EnableorDisable").GetComponent<UIButton>();
            EventDelegate del = new EventDelegate (this, "OnClick_Button");
            EventDelegate.Set (button.onClick, del);
   }

   void OnClick_Button()
   {
      CCTVController linker = GameObject.Find ("CCTVTableController").GetComponent<CCTVController> ();
      string CCTVnameClicked = gameObject.name;
      if (isEnabled == true) {
                  isEnabled = false;
         Debug.Log("also ran");
            linker.DisableCCTV (CCTVnameClicked);
            } else {
                  isEnabled = true;
            linker.EnableCCTV (CCTVnameClicked);
            }

      }

Once again, Thanks very much!  ;)

7
Thanks devomage,

I'll let you know once I updated my code!  ;)
Much appreciated.

8
Hi readers,

I have a problem that when I tried to instantiate NGUI sprite button prefab with scene object with script assigned to its UIbutton script under "notify". The link to the script in "notify" area is gone after being instantiated as a clone.

See the pictures for information.

I also tried to use the script I created to assign the object in scene to the UIButton script of the clones, but there are errors.
Here are the partial scripts attached to the buttons that I've tried:

1.) public GameObject lol;

void Start()
{
   lol = GameObject.Find ("CCTVTableController");
   gameObject.GetComponent<UIButton> ().onClick.Add (lol);
}

2.) gameObject.GetComponent<UIButton>().onClick.Add(GameObject.Find("CCTVTableController"));

Am I doing it wrong? Is there any better way that I can do it? Because I need to instantiate the buttons based on the number of CCTV services available that I can get from server.

Thanks :)

Pages: [1]