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.


Topics - capitalj

Pages: 1 [2]
16
NGUI 3 Support / Rigidbody performance
« on: October 03, 2012, 01:25:05 PM »
Hi, I saw in the latest version that new UIs get a rigidbody attached for performance reasons, does that mean we should add a rigidbody to our older NGUI UIs to improve performance?

-JJ

17
NGUI 3 Support / Resetting Tweens
« on: September 21, 2012, 07:08:34 PM »
Hi,

I'm using the TweenColor script to make a flashing color effect that is using the ping pong preset to go back and forth between 2 colors. I am wondering if there is a convenience method or if one could be added that would allow the object that is being tweened to be reset to it's original color/position,etc..?

Usually I find that I am enabling and disabling these tweens as they are needed but then the object they are on just stays on the last state it was on (ie: the color in between the from and to colors), and the Reset function doesn't actually modify the object. It would be great if there was a "resetObject" method or something that put the object back into the state it was in before the tween was activated.

-JJ

18
NGUI 3 Support / Localization keys
« on: August 13, 2012, 11:34:10 PM »
Hi,

I'm wondering if there is a way to localize strings that are created by combining several strings based on an event outcome, without making a key/string pair for every possibility?

For example: a text message in my game is created based on the outcome of an airstrike, so if the airstrike is successful the string will add together a few components like:

  1. string x = "Airstrike successful";
  2. x += "\nYou lost a plane during the airstrike";
  3. x += "\nYou dealt " + damageAmount + " damage";

I don't think there would be any way to insert the damageAmount integer, but what about the rest of the message?

-JJ

19
NGUI 3 Support / Health bar foreground always starts enabled
« on: July 26, 2012, 06:37:21 PM »
Hi,

I've followed the health bar instructions for creating floating healthbars above characters and it works great for the most part.

The only problem I am running into is that even when all the characters are off screen during the start of a scene, the foreground element of the progress bar of the health bar always becomes enabled. Stepping through the script I can see that the first time the LateUpdate is run on the health bar script it correctly disables both the foreground and the background of the healthbar progress bar, but then for some reason the foreground element re-enables somewhere else. So the result is that at the start of the level all the health bar foregrounds are shown at the center of the screen even if no characters are within view. Once the characters are visible the healthbar foreground appears correctly with the rest of the healthbar above the characters.

Is the UI Slider maybe changing the foreground when it activates? and thereby enabling the foreground uiwidget?

I can explain in more detail and some some code if that would help.

-JJ

20
NGUI 3 Support / Removing event listeners
« on: July 17, 2012, 05:19:33 PM »
Hi,

I'm wondering whether I need to remove event listeners when a scene has ended, typically I will put in a -= for events in the OnDisable method, but for NGUI events, should I do the same thing:

UIEventListener.Get(myButton).onClick -= UIButtonPressed;

or do these get removed by NGUI?

-JJ

21
NGUI 3 Support / Ignore objects under UI
« on: July 14, 2012, 10:59:47 PM »
Hi, this is probably something simple, but I couldn't find an answer to it from searching the forums. Is there a simple way to ignore input to objects underneath the UI? for example, if I have a character that is underneath a UI button and the button is pressed, can I have it so that the character is not selected as well? I've done this before by setting bool flags but that doesn't seem like the proper way to do this reliably. I've read a bit about using raycasts to ignore, is that the right direction?

-JJ

22
NGUI 3 Support / Disabled Sound - Feature Suggestion
« on: July 12, 2012, 07:29:26 PM »
Hi,

Just wanted to suggest a feature for a future update: disabled button sound effect, so that I can assign a sound for disabled buttons when someone pressed a disabled button.

Also, would be cool if I could assign a reference to a sound effect instead of an actual sound effect. This way I could make all buttons of a certain type all reference the same effect making it easier to update/change that sound.

Keep up the great work!

-JJ

23
NGUI 3 Support / How to find scroll view position
« on: July 06, 2012, 02:25:51 PM »
Hi,
I'm trying to figure out how to find out whether the scroll view is at one end of the scroll or the other so that I can show arrows if the scroll view can be scrolled in one direction or the other (ie whether it has reached the end or the beginning). I am using the clipped scroll view. Is there a property I can read to show the current position based on the max position?

-JJ

24
NGUI 3 Support / Mixing fonts and atlases
« on: June 07, 2012, 12:15:04 PM »
Hi,

Can we mix fonts and sprite atlases on one panel? ie: can I grab a font from Atlas A and a button from Atlas B? I've done it before but now I'm having the layer ordering give me problems where I can't move one of those above the other (so my text shows up underneath my button, etc..)

-JJ

25
NGUI 3 Support / Background and Foreground Popup List
« on: May 12, 2012, 05:40:50 PM »
Hi,

I am having a strange issue with the popup list where the background element overlaps the foreground element as in the screenshot.

Is there a way to get the background to start where the foreground button ends? and also is there a way to control the background so that it appears behind the foreground (say I wanted it to actually overlap a bit).

-JJ

26
NGUI 3 Support / Sorting tables
« on: May 10, 2012, 05:10:21 PM »
Hi,

Is there any way to sort a UITable with numbers instead of strings? I know it currently uses the gameobject's name, which is a string obviously.

Thanks!

-JJ

27
NGUI 3 Support / Scrolling scroll view with buttons
« on: May 07, 2012, 07:33:33 PM »
Hi,

I would like to scroll the contents of my scroll view (draggable panel version) using buttons (like a scroll left and scroll right button) instead of using scroll bars. What should the onclick of the buttons modify to do this?

-JJ

Pages: 1 [2]