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

Pages: [1]
NGUI 3 Support / How to reset UIToggle to initial value
« on: February 06, 2014, 08:14:27 AM »
Hi there,

I have 3 UIToggle groups:

Group 1 Contains 2 tabs on the top of the screen
Group 2 is contained inside a transform that is being activated when tab 1 is clicked, and contains a set of 8 uitoggles, to change pages inside the tab content
Group 3 is contained inside a transform that is being activated when tab 2 is clicked, and contains a set of 8 uitoggles, to change pages inside the tab content

The scenario is:
1.- I am on first tab, and with first page actived
2.- I click on page 4, for instance, the content appears
3.- I click on tab 2
4.- I click on tab 1. Here i launch a "load page 1" method, which changes the content and activates the first Group 2 uitoggle (value = true).
The problem is that both page 4 and page 1 are now being highlighted.

Is there a way to "reset to initial state" the whole group?



Hi there,

I have created a Scrollview, which has its "Scrollbar" value to a UIScrollbar parent, with this structure...
UIScrollbar (background)
   L... UIWidget (foreground)
   L... UISprite (Thumb)

If the contents of the ScrollView are big enough, the thumb goes correctly from top to bottom of the bar, but when it is not the thumb is not going correctly from top to bottom.
I realised the problem comes because the thumb is Anchored to the Foreground widget, and the widget is being scaled depending on the size of the contents of the scrollview, so it "hits" the boundaries of the background and doesn't allow the thumb to go further.

I also realised there is a UISlider component that could match better my needs, but Scrollview class doesn't allow to send a UISlider as the scrollbar parameter...

How could i fix this?

PS: i send a screenshot to better explain it

NGUI 3 Support / UITexture blend looks messy
« on: August 05, 2013, 05:59:52 AM »
Hi there,

I have a UITexture which is being downloaded from internet (Facebook picture), and should be displayed behind a round "hole" in a png sprite.
I activated the "Depth pass" option, and the UITexture has a Unlit/transparent colored material, but semitransparent pixels look quite messy...

I understand you cannot load a url inside a sprite so UITexture should be the correct way to do it, but how should I manage the alpha blend to make it look right?


NGUI 3 Support / Expand Sprite to available space?
« on: July 26, 2013, 07:51:38 AM »
Hi there,
I have two sprites, one anchored on the top of the screen and the other one to the bottom.
I need a center sprite which expands to the screen available space. But I cannot achieve it, i suppose i am missing some concept about NGUI.

Here is my code so far, without luck:

  1.         //get available height         
  2.         float availableHeight = (float)Screen.height;                          
  3.         foreach (Transform t in delimiters)
  4.         {
  5.                 availableHeight -= (t.localScale.y);
  6.         }                              
  8.         //set new height
  9.         Vector3 newHeight = transform.localScale;
  10.         newHeight.y = availableHeight;
  11.         transform.localScale = newHeight;

NGUI 3 Support / UIRoot: Why target Height?
« on: May 15, 2013, 02:54:20 AM »
Hi there,

I know you can adjust the  size of the panels to match a target height, but when creating mobile applications they are mostly in portrait mode. Wouldn't it be more adequate to set a target width and position  the elements on the screen via UIAnchors?

Is there an easy way to modify UIRoot to use target Width instead of Height?

Pages: [1]