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

Pages: 1 ... 3 4 [5] 6 7 ... 28
61
NGUI 3 Support / Re: ScrollBar issue
« on: December 31, 2013, 07:48:41 AM »
Latest version on the Asset Store and I'll try for the repo :)

62
NGUI 3 Support / ScrollBar issue
« on: December 31, 2013, 04:50:17 AM »
Hello,

I have an issue with a list using scrollbar.
If I start the scene with GameObjects active everything works fine, but if everything is disabled at start, and I activate them using NGUITools.SetActive, the scrollbar is dark and not working.

Any idea of what's happening?

Here's a small video that shows the issue.
http://www.youtube.com/watch?v=SCs6_k9Gv9g

PS : The issue is only happening if my UIScrollView has scrollbars as "OnlyIfNeeded".
PS 2 : Even if after adding items to the scrollview via script, I call : UpdateScrollbars the scrollbars remain dark, but if I drag the list the scrollbar will move (but I can't drag the scrollbar itself).

63
NGUI 3 Support / Re: Addons to UILabel
« on: December 29, 2013, 03:13:36 PM »
I disagree but OK ;)

64
NGUI 3 Support / Re: Addons to UILabel
« on: December 28, 2013, 12:25:21 PM »
Cool !

Imagine you have a UI where you want to create between 1-10 monsters. You just set the slider with 10 steps and display on the thumb the current step :)

65
NGUI 3 Support / Addons to UILabel
« on: December 27, 2013, 05:42:15 AM »
Hello !

Currently on a slider, we can have a OnValueChange. If we drop a UILabel on this, we have some methods at disposal, such as UILabel.SetCurrentPercent.
It would be nice to have so more options here, such as SetCurrentValue and SetCurrentStepValue.

I added them on a different script that I attach to my label, but I think it would be nice to have them by default no ?

  1. public void setCurrentStepValue()
  2. {
  3.         if (UIProgressBar.current != null)
  4.         {
  5.                 m_label.text = (m_startingValue + Mathf.Round(UIProgressBar.current.value * (UIProgressBar.current.numberOfSteps - 1))).ToString();
  6.         }
  7. }
  8.  

  1. public void setCurrentValue()
  2. {
  3.         if (UIProgressBar.current != null)
  4.         {
  5.                 m_label.text = UIProgressBar.current.value.ToString("f1");
  6.         }
  7. }
  8.  

66
NGUI 3 Support / Re: TweenPosition and new Anchors
« on: December 23, 2013, 08:53:30 AM »
Yup, that's what I recommended on my first post ;)

67
NGUI 3 Support / Re: TweenPosition and new Anchors
« on: December 23, 2013, 05:28:37 AM »
+1 :)

What do you recommend?

68
NGUI 3 Support / Re: Using simple sprite with anchors
« on: December 19, 2013, 12:11:07 PM »
Cool!

69
NGUI 3 Support / Using simple sprite with anchors
« on: December 19, 2013, 04:44:47 AM »
Hello,

Let's say I have a UIWidget with anchors on it, so that it's size changes when the screen size changes.
So I could have this widget with a size of 100x90, and with a lower screen size, a size of 50x25.

If I have a sprite, as a child of this UIWidget, which size is 80x80.
It will render nice inside the first size, because it fits, but for the second size, it will be too big :/

So the question is : How to automatically resize the sprite so it keeps its ratio?

70
NGUI 3 Support / Re: Best NGUI hierarchy?
« on: December 17, 2013, 06:34:51 AM »
Ahah :)

71
NGUI 3 Support / Re: Best NGUI hierarchy?
« on: December 17, 2013, 05:54:09 AM »
Yeah I think we should do per-problem, but I wanted to know if we can have a consistent solution across the project. I have my answer now :)

72
NGUI 3 Support / NullPointer using ScrollView
« on: December 17, 2013, 05:41:54 AM »
I have a scrollview with a vertical scrollbar.
The GameObject holding everything is disabled in the scene, and in the code, when I'm calling "m_scrollView.ResetPosition()" I have a null pointer.

Here's the stacktrace :
Quote
NullReferenceException
UnityEngine.Component.get_gameObject ()
UnityEngine.Component.GetComponentsInChildren[UIWidget] (Boolean includeInactive)
NGUIMath.CalculateRelativeWidgetBounds (UnityEngine.Transform root, UnityEngine.Transform child, Boolean considerInactive) (at Assets/NGUI/Scripts/Internal/NGUIMath.cs:376)
NGUIMath.CalculateRelativeWidgetBounds (UnityEngine.Transform root, UnityEngine.Transform child) (at Assets/NGUI/Scripts/Internal/NGUIMath.cs:367)
UIScrollView.get_bounds () (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:161)
UIScrollView.SetDragAmount (Single x, Single y, Boolean updateScrollbars) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:463)
UIScrollView.ResetPosition () (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:527)
here is the call to ResetPosition

73
NGUI 3 Support / Re: Best NGUI hierarchy?
« on: December 17, 2013, 05:37:41 AM »
Also a disadvantage for the second method, it's if you want to change the alpha of the sprite, it will change also change the alpha of children :/

74
NGUI 3 Support / Re: TweenPosition and new Anchors
« on: December 17, 2013, 05:27:47 AM »
Hum... sorry it seems to be working having the TweenPosition and Widget...

The Tween is correctly played, but there is a few issues :
- I can't set the starting position to be anything else than the anchor.
So imagine the anchor is set to the center of the screen (this is my TO position), and the FROM position is at the top of the screen.
I can't set the position to the FROM.

- If I play the tween back (from center of the screen to the top), it works, but as soon as it's over, the position resets to the position defined by the anchor...

75
NGUI 3 Support / TweenPosition and new Anchors
« on: December 17, 2013, 05:22:10 AM »
Hello !

Is there a way we can tween the position of a panel or group of widgets that are using anchors?

What I've done, is create at the root of the window I want to move, an empty GameObject with a TweenPosition and a UIWidget.
And everything beneath the UIWidget will use anchors on this empty gameobject (so everything is based on the dimension of this UIWidget).

It's working fine like this, but !
I can't specify the size of this UIWidget to always be the size of the screen for example.



I think the solution is to have a script on this UIWidget that will set the dimension of it to the screen size at startup and then do nothing else.
What do you think?

If it's a solution that works, why not add a bool on the new anchor types with "run only at startup" as you did with last anchors?

Pages: 1 ... 3 4 [5] 6 7 ... 28