Unity Community |

NGUI is not compatible with EZGUI or SpriteManager, but you can make it compatible by renaming conflicting class names.
NGUI Resources: Documentation | Forum | Release Notes
Want to get notified when NGUI gets updated? Subscribe to this thread.
No no, I want to use OnRelease, but as I said, the behavior differes from what you know from other GUIs of applications/operating systems like Windows, iOS and so on. When you release the press/click and you're not above the item, it shouldn't trigger the OnRelease method.
If you want that kind of behaviour, change UIButtonMessage OnPress function from:
Code:
void OnPress (bool isPressed) { if (((isPressed && trigger == Trigger.OnPress) || (!isPressed && trigger == Trigger.OnRelease))) Send(); }
To:
Code:
void OnPress (bool isPressed) { if (((isPressed && trigger == Trigger.OnPress) || (!isPressed && trigger == Trigger.OnRelease && UICamera.lastHit.collider == collider))) Send(); }
NGUI Resources: Documentation | Forum | Release Notes
Want to get notified when NGUI gets updated? Subscribe to this thread.
I'm trying to build a tree like control using NGUI to show hierarchical data. I've got a simple tree view using nested UIGrid's but have to manually insert blank items (underneath parent tree nodes) to show tree indentation. What could be the best possible approach in NGUI to make such a control?
Best approach? Create a custom widget. It may not be necessarily the fastest, however. You can also write your own placement class instead of the grid / table. That would be faster.
NGUI Resources: Documentation | Forum | Release Notes
Want to get notified when NGUI gets updated? Subscribe to this thread.
Hi.
How to change the UILabel alpha In script?
My code can't works.
Code:
using UnityEngine; using System.Collections; private UILabel label; // Use this for initialization } // Update is called once per frame label.color.a = 0.5f; } }
Where is alpha ?
Hi,
I d like to make a feature request:
I d like to have a new Clipping option for the UIGrid:
-When any of the child of an item in the UIGrid is not visible, then make the whole item not visible.
This way I could certainly avoid using the slow OpenGL ES 2.0.
Please let me know if that is ok.
Stephane
@ArcDragon:
You shouldn't use GameObject.Find. It's slow, and hard-coding names is a very bad practice. Attach this script directly to the label instead, or have a public reference to your label that you will set in the inspector.
Try attaching this script to your label:
Code:
using UnityEngine; [RequireComponent(typeof(UILabel))] { UILabel mLabel; { mLabel = GetComponent<UILabel>(); } { Color c = mLabel.color; c.a = 0.5f; mLabel.color = c; } }
@mohydine: Clipping is done entirely via shaders right now. You can certainly write a different class to do the kind of clipping you're describing, and it would be pretty easy to do -- simply store the rectangles of each of the child of the new grid (NGUIMath.CalculateRelativeWidgetBounds), then check them against some rectangle specified in your script.
NGUI Resources: Documentation | Forum | Release Notes
Want to get notified when NGUI gets updated? Subscribe to this thread.
@ArenMook
Thank you for your tip!
You've been very helpful!
Hi guys!
Probably you will be interested in our NGUI extension - NData, that allows you to implement ui independent logic and use automatic data bindings - http://forum.unity3d.com/threads/127...ework-for-NGUI
Cheers,
Hi.
Excuse me.
I want to question again.
I use progress bar.
Bar works in unity project.
but,progress bar don't works in web player,after I build game.
This is my code,which is attached to progress bar object.
Code:
using UnityEngine; using System.Collections; private UISlider slider; slider = GetComponent<UISlider>(); } slider.rawValue = slider.rawValue * 0.9f; } }
Why?
Hi,
I was wondering what kind of text formatting is possible with NGUI? Are we just able to change the colour or can we do other things as well?
I'm currently working on a project that requires a lot of text formatting - pretty much anything you can do with HTML would be nice, but I know that's asking a lot
The two primary features I would need are proper bullets with indentation:
- Item 1
- Item 2
- Item 3
And being able to specify a hyperlink in the text.
Do you have any plans for more text formatting?
Thanks for your time - the plugin looks great![]()
you need to use slider.sliderValue instead of rawValue. rawValue is only for use in the editor.Hi.
Excuse me.
I want to question again.
I use progress bar.
Bar works in unity project.
but,progress bar don't works in web player,after I build game.
This is my code,which is attached to progress bar object.
Code:
using UnityEngine; using System.Collections; private UISlider slider; slider = GetComponent<UISlider>(); } slider.rawValue = slider.rawValue * 0.9f; } }
Why?
I currently have no plans to add support for hyperlinks in text. A skilled dev could add support for that within a few days, but it would complicate the system too much for me to add it to NGUI myself. I want to keep it simple to make it easier for others to modify it to suit their needs.Hi,
I was wondering what kind of text formatting is possible with NGUI? Are we just able to change the colour or can we do other things as well?
I'm currently working on a project that requires a lot of text formatting - pretty much anything you can do with HTML would be nice, but I know that's asking a lot
The two primary features I would need are proper bullets with indentation:
- Item 1
- Item 2
- Item 3
And being able to specify a hyperlink in the text.
Do you have any plans for more text formatting?
Thanks for your time - the plugin looks great
NGUI Resources: Documentation | Forum | Release Notes
Want to get notified when NGUI gets updated? Subscribe to this thread.
Does NGUI offers an easy system to create menus for different screens resolutions like iPhone3G or iPhone4. iPad or iPad retina..
Thanks!
@Jaimi
Thank you very much!
It works!
Yes, there are a few tools for that. You can choose your layout to scale with the resolution, or stay pixel-perfect as the dimensions change. UIAnchor lets you glue widgets to sides or corners of the screen. UIAtlas and UIFont have a 'replacement' parameter, letting you swap SD for HD atlas... and a few other tricks.
NGUI Resources: Documentation | Forum | Release Notes
Want to get notified when NGUI gets updated? Subscribe to this thread.
Thanks @ArenMook, that's all I need to know to purchase it!
Hi
And whats about changing cursor pointer by rollover a button?
I mean, this is the very common way to show the user, what's interactive and what not..
Hi.
I'm sorry to bother you again.
I have a health bar question in the NGUI.
How can I set health bar above game object?
I read this topic.
http://www.tasharen.com/?topic=creat...ite-on-the-fly
With reference to this topic, I tried to make.but my project don't works...
What should I do?
my project construction
Hierarchy
Cube(AddUnitHUD is attached),MainCamera,Ground
Project
Anchor,AddUnitHUD,UnitHUD,NGUI
Anchor
-Panel(UnitHUD is attached)
--Label
--Progress Bar
Thank you.
Last edited by ArcDragon; 03-18-2012 at 08:45 AM. Reason: Optional