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

Pages: [1]
1
NGUI 3 Support / Re: Checking if input down on button
« on: June 28, 2014, 12:47:10 AM »
That did the trick.  Thank you :)

2
NGUI 3 Support / Checking if input down on button
« on: June 26, 2014, 02:20:23 PM »
My game has a feature where I move a button's position across the screen.  Sometimes the button will slide under the user's finger, which is already down on the screen before the movement.  I'd like a way of detecting whether the button is under the user's finger.

Normally you can do the detection with an event, but the event only fires when the finger is depressed, and not when a button is moved under an already depressed finger.

3
NGUI 3 Support / Re: Press event not registering when alpha is zero
« on: June 22, 2014, 11:55:54 PM »
Cool.  Thanks for the help.

4
NGUI 3 Support / Press event not registering when alpha is zero
« on: June 22, 2014, 09:01:51 PM »
I have a background sprite with a collider attached that fills the entire screen.

If I click on it, I correctly receive the OnPress event.

However, if I set the sprite's alpha to zero, I no longer receive the press event.  What would cause this?

5
NGUI 3 Support / Re: NGUI unparents my elements
« on: April 06, 2013, 12:27:24 AM »
Widgets should never be parents of other widgets. Your scale will fuck up and your mind will explode.

Make a comment parent instead

-ParentObject: scale 1,1,1
--widget1: scale: pixelX, pixely, 1
--widget2: scale: pixelX, pixely, 1

My mind just fucking exploded!

Pop!

6
NGUI 3 Support / Re: Colliders for containers.
« on: March 22, 2013, 02:16:59 PM »
I ended up using UICamera.hoveredObject by checking whether it's a child of my container.  Seems to work fine ..

7
NGUI 3 Support / Colliders for containers.
« on: March 21, 2013, 08:37:42 PM »
I'm looking for a way of getting the OnHover event for a container, with a number of widgets inside.

I can put a collider over the container using NGUITools.AddWidgetCollider, but it looks like NGUI only supports events for ONE object under the mouse at a time.

Any way around this, besides hacking UICamera.cs?

8
NGUI 3 Support / Re: Bug with UIPanelAlpha?
« on: December 18, 2012, 05:09:54 PM »
Just tried the same thing with NGUI's builtin alpha tweener, and things work ok.

Though this should still probably be fixed so things can be piped in from the outside.

9
NGUI 3 Support / Bug with UIPanelAlpha?
« on: December 18, 2012, 04:44:15 PM »
I added a UIPanelAlpha component to my panel node, and set its Alpha value to 0.

In another script, I use iTween to change the alpha value:

  1.  
  2.     public float fadeInTime = 0;
  3.  
  4.     private void Start() {
  5.         if (fadeInTime > 0) {
  6.             iTween.ValueTo(gameObject, iTween.Hash(
  7.                 "from", 0,
  8.                 "to", 1,
  9.                 "time", fadeInTime,
  10.                 "onupdate", "OnFadeInUpdate"));
  11.         }
  12.     }
  13.  
  14.     private void OnFadeInUpdate(float amount) {
  15.         GetComponent<UIPanelAlpha>().alpha = amount;
  16.     }
  17.    
  18.  

The fade itself works ok, but after the fade, the buttons are in a disabled state.


If I remove the following lines in UIPanelAlpha.cs:
  1.  
  2.                 // Fade out finished -- disable all game objects
  3.                                 Transform trans = transform;
  4.                                 for (int i = 0, imax = trans.childCount; i < imax; ++i) NGUITools.SetActive(trans.GetChild(i).gameObject, false);
  5.                                 mLevel = 0;
  6.  
  7.  

... then the problem goes away.  Why does it think there was a fade out when the alpha value started from zero?

10
NGUI 3 Support / Anchoring a table to the right of screen
« on: December 13, 2012, 05:17:30 PM »
Is there any way to anchor a table to the right of the screen without writing code?

It seems the table's pivot point is locked into the top left.

Pages: [1]