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

Pages: [1]
1
NGUI 3 Support / Re: Return on UIInput
« on: December 14, 2015, 05:48:35 PM »
It seems that the Return key is not recognized (Submit) with NGUI input field on Mac OSX web player in 5.3.0f4.   I cannot execute multiplayer chat using submit.  If I use the OnChange field it works –– but with the expected results:  continual readout. Return Key submit works fine in the Unity editor. 

This seems to be a Unity bug, not NGUI, yes?  Is there a fix?

I am uncertain what to do here.  Is there a temporary workaround?

Thanks for your time.

2
NGUI 3 Support / HUD text size
« on: October 16, 2013, 01:27:42 PM »
Having trouble with HUD text size.  Need to scale transform near 30 to be visible/usable. At 1-10 it is minuscule. Consequently, the localScale.y variable sets to 30 and sends the text zooming off when a new entry appears...screwing up the offset. 

Any thoughts would be a big help! 

3
NGUI 3 Support / UIButton.collider disabled
« on: August 06, 2013, 07:57:50 AM »
I’m making a level unlock system using UIButton with the box collider disabled.  I am having trouble using NGUI Tools to enable them.  Consequently, I am using the above Unity code with mixed results.

I simply want to activate the box collider on the UIButton, enabling it and restoring its color. Am I using SetActiveChildren appropriately?
Is there a better way?

Thank you for any help you might offer.

  1. int n = 0;
  2.                 for(int i=0; i<maxLevels; i++)
  3.                 {                                              
  4.                                 if(n <= Misc.getMaxLevel())
  5.                                 {
  6.                                         //NGUITools.SetActiveChildren(planetButton[n], true);
  7.                                         planetButton[n].collider.enabled = true;
  8.                                                
  9.                                                 Misc.setStartSpawnerIndex(0);
  10.                                                 Misc.setStartRound(1);
  11.                                                                                        
  12.                                 }else{
  13.                                         //NGUITools.SetActiveChildren(planetButton[n], false);
  14.                                           planetButton[n].collider.enabled = false;                                    
  15.                                 }
  16.                                 n++;
  17.                 }
  18.  

4
NGUI 3 Support / Access to Filled Sprite Scale x
« on: June 14, 2013, 01:00:13 PM »
Using a sliced sprite my progress bars work with this code   "...slider.foreground.localScale.x"  ...but not the filled sprite.

Is there an extra parameter for a filled sprite that I need to access?

Thanks for the help!

5
NGUI 3 Support / Saved States for Progress Bar Data
« on: June 13, 2013, 10:15:13 AM »
Is there a built in mechanism to save the progress bar data across scenes in Unity?  Right now, each scene has its own UIRootMenu...so the date is lost across scenes.  Should I maintain the same UI with "DontDestroyOnLoad"  (Trouble is, each scene has its unique public variables, settings, etc.)  Should I use a persistent gameObject script (GameManager) that holds the data? 
New territory for me.

If anyone could point me in the right direction I would be most grateful.

Many Thanks,

6
NGUI 3 Support / Re: Popup List tutorial
« on: May 03, 2013, 01:47:18 PM »
Thanks for the reply.  But what message is being sent?  It looks like the “value” of “mSelectedItem” is sent––meaning, the string name of the button selected? Or, is it returning a list number? 
  • ,[1],[2],[3]  If so, how would I access that precisely?


From UIPopupList:

if (mSelectedItem != value)
         {
            mSelectedItem = value;
            
            if (textLabel != null)
            {
               textLabel.text = (isLocalized) ? Localization.Localize(value) : value;
#if UNITY_EDITOR
               UnityEditor.EditorUtility.SetDirty(textLabel.gameObject);
#endif
            }

            current = this;
            if (onSelectionChange != null) onSelectionChange(mSelectedItem);

            if (eventReceiver != null && !string.IsNullOrEmpty(functionName) && Application.isPlaying)
            {
               eventReceiver.SendMessage(functionName, mSelectedItem, SendMessageOptions.DontRequireReceiver);
            }
            current = null;
         }
         
         if (textLabel == null) mSelectedItem = null;
      }



I have an empty game object with a script on it I want to access from another scene plugged in as my Event Receiver.  Within it I have the following...

public string mSelectedItem;

void OnSelectionChange()
   {   
      if (mSelectedItem == "Easy")
      {
         minA = 0;
         maxA = 9;
         minB = 0;
         maxB = 9;
      }

   ...etc..}


How should I approach this?  Am I missing the boat here?  Any help would be appreciated. 

Many thanks!

7
NGUI 3 Support / Re: Popup List tutorial
« on: May 02, 2013, 06:01:54 PM »
Thanks for the post.  I am new to coding and have a similar confusion: 

all I want is to know how to capture the current popup menu item as a variable, when you click on it.  Or at least get the string so I can then do something with it....... There seems to be a lack of examples in the documentation for basic tasks.

Could you show an example of how to access the chosen menu item?  Do I need to create another script with the "OnSelectionChange" method and then use conditional to respond to the selection?

General thought:  NGUI is beautifully conceived. I have the pro version. Thank You.  But, most of the tutorials are on aesthetics and design. I find this aspect of NGUI, because of its design, easy enough to figure out. Precious few tutorials (actually none) are about implementing NGUI with code: How to make our pretty buttons and sliders actually do something.   

If you could do one video on coding/implementing the button, slider, checkbox, popup-list/menu, etc...We neophytes would be most grateful!   

Pages: [1]