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

Pages: [1]
1
NGUI 3 Support / UIInput and submit button
« on: April 15, 2015, 06:41:42 AM »
I Use unity Input and defined additional button for "Submit" behavior ("E") default is just "return"

and UIKeyNavigation doesn't work with "E", I see that UIInput class use hardcoded key code and doesn't work with Input.

I use 3.6.3 version and not sure whether it fixed in latest version.

2
NGUI 3 Documentation / Re: UIKeyBinding
« on: March 25, 2015, 03:18:23 AM »
is this possible to adjust event order.
I have following structure
UIRoot
|--- FullScreenWidget (UIKeyBinding)
|--- DialoguePanel (UIPanel)
|----|----FullScreenWidget (UIKeyBinding)

fullscreenWidget listen Escape button, Dialogue panel sometime become active and on escape it's just close Dialogue panel
Root FullScreenWidget on escape close application.


How it works right now - both UIKeyBinding fired and both event executed, but i need just on with higher depth

3
NGUI 3 Documentation / Re: UIPopupList
« on: October 14, 2014, 12:44:57 AM »
Is there an easy way to set the current selection from script?

I'm trying to do dropdown.value = "One of the available options"; but it doesn't seem to work.

Hi, I've just faced the same problem, I had an event handler which stored selected data. and the problem was that initially UIPopupList  set default value from inspector, and my handler pick this value and rewrites actual value.
The solution was to unsubscribe from onChange method in Start and subscribe back after initial default value performed.

  1.         void Start ()
  2.         {              
  3.                 UIPopupList popup = GetComponentInChildren<UIPopupList>();
  4.                 EventDelegate.Remove(popup.onChange, new EventDelegate(this,"OnDifficultyChange"));
  5.                 popup.value = UserData.Instance.Difficulty.ToString();
  6.                 EventDelegate.Add(popup.onChange, new EventDelegate(this,"OnDifficultyChange"));
  7.         }
  8.  
  9.         public void OnDifficultyChange(){
  10.                 UserData.Instance.Difficulty = (Difficulty) System.Enum.Parse(typeof(Difficulty),  GetComponentInChildren<UIPopupList>().value);
  11.                 UserData.Instance.SaveChanges();
  12.         }
  13.  
  14.  

p.s. Probably there is more easy method to subscribe and unsubscribe from events.

4
NGUI 3 Support / Re: How to design dialogs
« on: June 27, 2012, 09:45:20 PM »
I understand that it can be a complex task,
But anyway maybe there is a good practice, or someone already experienced in dialog creation.
I have no any idea how to change one window to another. just know , how to create HUD, and game menu where each button load separated scene.


upd:
sorry.. looks like examples already contains menu and so on (http://www.tasharen.com/ngui/example8.html)
looks like this is advised approach.

Thanks  everyone =)

5
NGUI 3 Support / How to design dialogs
« on: June 27, 2012, 01:50:19 AM »
Hello,

Could you please explain me how to design dialogs.
Assume we have a main screen and button "save"
when you click button save it should ask you fileName.
This is very simple example, i understand that it can be performed just from code.
But I'm interesting, how to do that directly through UI (because screen can be more complex (like a file navigator and so on), i don't know how, but maybe create several cameras and so on.

And please point me to any "how to", how to make e.g. transition between main menu(start, load,config,exit) and e.g. config screen


thanks in advance.

Pages: [1]