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

Pages: 1 [2]
NGUI 3 Support / Re: tooltil not showing.
« on: April 03, 2014, 06:04:42 AM »
I am using unity 4.3 and I have the latest version of NGUI (I just bought it a week ago)

When I create a new NGUI label, I can press enter to create line break, but when I define my own string (see below)

public string tooltipText;

In the inspector, I can't press enter.....using \n won't make a line break either.... a bit stuck really....

NGUI 3 Support / Re: turning a normal button into on-off switch button
« on: April 01, 2014, 04:09:51 PM »
thanks for the tips! i got it working now :)

NGUI 3 Support / Re: tooltil not showing.
« on: April 01, 2014, 04:09:24 PM »
I did try pressing enter, it won't work....  :'(

NGUI 3 Support / turning a normal button into on-off switch button
« on: April 01, 2014, 08:33:11 AM »

I am trying to write a script to turn a button into an on-off switch button: (see below)

It works when my mouse pointer is within the button area, but as soon as my mouse pointer moves out of the button, the sprite changes back to the original sprite. How do I address this?

   public bool isOn; // Clicking will toggle the button on and off. Starts off
   public string spriteName_On; // The name of the sprite when it's on
   public string spriteName_Off; // The name of the sprite when it's off

   public void OnClick()
      if (isOn)
         //Is on, turn off
         this.GetComponent<UISprite>().spriteName = spriteName_Off;

         // Is off, turn on
         this.GetComponent<UISprite>().spriteName = spriteName_On;
      isOn = !isOn; // Toggle it so it flips between on and off

NGUI 3 Support / Re: tooltil not showing.
« on: March 31, 2014, 04:50:32 PM »
somehow \n does not work when I key in the string in the inspector it a Unity bug?

NGUI 3 Support / tooltil not showing.
« on: March 29, 2014, 01:52:03 PM »

I copied the tooltip object from the Character example scene from NGUI.

I want the tooltip to show on a button when I hover over it.

How can I achieve this?


[edit] I made it work now with the following. However \n does not create a line break. How can I create a line break? Also how can I set the alpha value of the tooltip ? It is semi-transparent and I want it appear in solid colour. thanks!

   public string tooltiptext = "Human\n Resources";

   void OnTooltip(bool show) {
      if (show)

NGUI 3 Support / Re: disabling all the interactions of a window
« on: March 27, 2014, 03:27:24 PM »
it works! u guys are amazing:) thanks

NGUI 3 Support / disabling all the interactions of a window
« on: March 26, 2014, 02:17:48 PM »
Dear all

I am new to NGUI and I hope you can help me with a question. I have set up an "option window" with a list of options and another "confirmation window" (see attached). When I click on an option, the "confirmation window" pops up. I want to disable all the interactions of the option window when the "confirmation window" is up. How can I do this?


NGUI 3 Documentation / Re: UIGrid
« on: March 26, 2014, 11:49:40 AM »
brilliant!! it works now!

just for future reference, UpdateScrollbars (with small b for bars!) . took me a while to figure out  :-[

NGUI 3 Documentation / Re: UIGrid
« on: March 25, 2014, 05:06:20 PM »
I have just bought NGUI and began to explore it. it is amazing so far following the tutorial on youtube! thanks a lot for creating such an amazing library!

I have a question on dynamically adding items to the grid and have the grid arrange the item dynamically. I use playmaker, but I am also familiar with c sharp/javascript, so either solutions would be fine.

I have a grid inside scroll view with 3 items which I can scroll vertically. Then I create a button, and when the button is clicked, I want to add a new item into the grid. I learn that (from youtube and this post) to ask the grid to automatically arrange the items, I right click UIGrid script and select execute. But how do I do it when the game is running?

thanks again!

[edit] silly me, as soon as I created this post, I found a solution , which is to call Reposition method...however the newly created items in the grid are not clipped by the scroll view?? also the new items are not draggable despite having UIDragDropItem script. any clue why it is the case?

[edit] I solved it another problem....I have a vertical scroll bar, when the items are added to the grid, the scroll bar display is not do I resolve it? thanks!

Pages: 1 [2]