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

Pages: [1] 2
1
NGUI 3 Support / Re: UISlider thumb position bug
« on: April 08, 2015, 05:42:45 AM »
yeah but ..
Can you tell me why you are using a world position to set the thumb and not a local position ?

2
NGUI 3 Support / Re: UISlider thumb position bug
« on: April 06, 2015, 06:54:30 AM »
Any solution ?

3
NGUI 3 Support / Re: UISlider thumb position bug
« on: March 26, 2015, 11:42:56 AM »
Yeah that's excalty why this is bugged with Scale 0,0,0

Notice that the foreground is corretly calculated, may be you can use it to setup the thumb position without using the inverse matrix ?
Or even easier, you know the width of the UISlider and his value, just get the thumb position with a Lerp ;-)

4
NGUI 3 Support / UISlider thumb position bug
« on: March 25, 2015, 09:55:32 AM »
Hello ArenMook,

I have encounter un problem with the slider thumb position.
The thumb position is not correctly set, if you change the value of the slider while the control scale is Zero. (see attachment)

To replicate it :
- Set the LocaleScale of the UISlider to 0,0,0
- Change the UISlider value
- Set the LocaleScale of the UISlider to 1,1,1
- The thumb is at the center and not at the value

Why am I setting the scale to 0 ? Because of some transition/animation purpose.

I dug in the code to see where the pb come from :
The SetThumbPosition of UIProgressBar use InverseTransformPoint to setup the position, which is affected by the scale.
But I think that the scale of a widget should not affect his behaviour..

  1.         protected void SetThumbPosition (Vector3 worldPos)
  2.         {
  3.                 Transform t = thumb.parent;
  4.  
  5.                 if (t != null)
  6.                 {
  7.                         worldPos = t.InverseTransformPoint(worldPos);
  8.                         worldPos.x = Mathf.Round(worldPos.x);
  9.                         worldPos.y = Mathf.Round(worldPos.y);
  10.                         worldPos.z = 0f;
  11.  
  12.                         if (Vector3.Distance(thumb.localPosition, worldPos) > 0.001f)
  13.                                 thumb.localPosition = worldPos;
  14.                 }
  15.                 else if (Vector3.Distance(thumb.position, worldPos) > 0.00001f)
  16.                         thumb.position = worldPos;
  17.         }
  18.  

Decco

5
NGUI 3 Support / Tiled Sprite
« on: February 03, 2015, 12:31:45 PM »
Hello ^^

When I set a 9-sliced sprite type to "Tiled", I'm not getting the expected behaviour.
I'm expected the exact same as :
Type : Advanced
- Left : Tiled
- Right : Tiled
- Top : Tiled
- Bottom : Tiled
- Center : Tiled

It similary to "Sliced" behaviour, but the borders are tiled instead of stretched (for exemple if you have a pattern in the sprite)

Is it intended or not ?

Decco

6
NGUI 3 Support / Local Alpha
« on: February 03, 2015, 12:17:08 PM »
Hello ^^

The alpha system is working well when you want to fade out a panel with all widgets, etc.

But sometime when you have this structure :
-Button
-|-Label

You might want to set some transparency on the button background and keep full opacity on the label.
So a Local Alpha value that does not change children alpha would be really useful.

What do you think ArenMook ?

Decco

7
NGUI 3 Support / Re: Windows Store Error
« on: December 29, 2014, 06:54:19 AM »
Perfect ! Thank you !

8
NGUI 3 Support / Windows Store Error
« on: December 22, 2014, 10:46:46 AM »
Hello ArenMook,

I'm using Unity 4.5.5 and NGUI 3.7.7
I'm building for Windows Store Universal 8.1

And I have this compilation error :

  1. Assets/NGUI/Scripts/UI/UIInput.cs(1126,29): error CS0103: The name `mKeyboard' does not exist in the current context

I think it's due to a problem with the preprocessor directive around this line.

Decco

9
NGUI 3 Support / Re: Make UIPanel.GetWindowSize() public
« on: December 12, 2014, 10:10:36 AM »
I'm not stupid, I made it public myself in my project.

It's just a little change request to be public by default. So you don't need to change it every time you update NGUI.
And I'm sure it will be usefull for all the community. ;-)

10
NGUI 3 Support / Make UIPanel.GetWindowSize() public
« on: December 11, 2014, 10:14:49 AM »
Hello,

Can you make UIPanel.GetWindowSize() public, as UIPanel.GetViewSize() ?

I'm doing some anchoring math with constrained panel and I need those value.

Thank you ;-)

11
NGUI 3 Support / Re: Offset anchors by position
« on: September 18, 2014, 03:35:47 AM »
Hi,

Sorry but there is no Panel on the UIRoot, I removed it. Instead I have added a panel as a child of the camera (you can see it on the screenshot).
I'm doing that because I need multiple panel under the same camera.
Each panel will manage one window. That's the right way to do it, right ?

So, the sprite under the panel, is anchored to its panel, not to the camera or the UIRoot.
If I check the option "Offset anchors by position", on that panel, it allow me to move the panel under the camera with the anchored sprite, right ? (Else the sprite doesn't move if not checked) It's working well to make some animation, for exemple.

But now, if you just move the UIRoot out of (0,0,0), because you setup the GUI outside of the game assets (it's easier to view when there is no other assets in front of the camera),
the offset is now broken..

Am I doing anything wrong ?

12
NGUI 3 Support / Offset anchors by position
« on: September 17, 2014, 09:59:25 AM »
Hi,

When you check the option "Offset anchors by position" on a panel, if the UIRoot is not at (0,0,0), the underlaying anchored widget is offset by the UIRoot position + the UIPanel position.
It should be only offsetted by the Panel position, I think.

In the screenshot, UIRoot is set to (0,10,0), UICamera to (0,0,0), UIPanel to (0,0,0) and the sprite is anchored to the top left corner of the Panel.


13
That's cool ! Thank you ^^

14
But "Shrink Portrait UI" option (and also "Adjust by DPI" option) are only used in PixelPerfect mode.
Here, it's more like FixedSize mode, which does not use those options either.

The Fit and Fill options also check the aspect, so if the height becomes larger than width, it will shrink in the same way.

15
Hello,

It does not use the "shrink portrait UI" option, because it works as well in landscape and in portrait.

Pages: [1] 2