NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UIPopupList Class Reference

Popup list can be used to display pop-up menus and drop-down lists. More...

Inheritance diagram for UIPopupList:
UIWidgetContainer

Public Types

enum  Position { Position.Auto, Position.Above, Position.Below }
 

Public Member Functions

delegate void LegacyEvent (string val)
 
void Close ()
 Manually close the popup list. More...
 

Public Attributes

UIAtlas atlas
 Atlas used by the sprites. More...
 
UIFont bitmapFont
 Font used by the labels. More...
 
Font trueTypeFont
 True type font used by the labels. Alternative to specifying a bitmap font ('font'). More...
 
int fontSize = 16
 Size of the font to use for the popup list's labels. More...
 
FontStyle fontStyle = FontStyle.Normal
 Font style used by the dynamic font. More...
 
string backgroundSprite
 Name of the sprite used to create the popup's background. More...
 
string highlightSprite
 Name of the sprite used to highlight items. More...
 
Position position = Position.Auto
 Popup list's display style. More...
 
NGUIText.Alignment alignment = NGUIText.Alignment.Left
 Label alignment to use. More...
 
List< string > items = new List<string>()
 New line-delimited list of items. More...
 
Vector2 padding = new Vector3(4f, 4f)
 Amount of padding added to labels. More...
 
Color textColor = Color.white
 Color tint applied to labels inside the list. More...
 
Color backgroundColor = Color.white
 Color tint applied to the background. More...
 
Color highlightColor = new Color(225f / 255f, 200f / 255f, 150f / 255f, 1f)
 Color tint applied to the highlighter. More...
 
bool isAnimated = true
 Whether the popup list is animated or not. Disable for better performance. More...
 
bool isLocalized = false
 Whether the popup list's values will be localized. More...
 
List< EventDelegateonChange = new List<EventDelegate>()
 Callbacks triggered when the popup list gets a new item selection. More...
 

Static Public Attributes

static UIPopupList current
 Current popup list. Only available during the OnSelectionChange event callback. More...
 

Protected Member Functions

void TriggerCallbacks ()
 Trigger all event notification callbacks. More...
 

Properties

Object ambigiousFont [get, set]
 Font used by the popup list. Conveniently wraps both dynamic and bitmap fonts into one property. More...
 
LegacyEvent onSelectionChange [get, set]
 
bool isOpen [get]
 Whether the popup list is currently open. More...
 
string value [get, set]
 Current selection. More...
 
string selection [get, set]
 

Detailed Description

Popup list can be used to display pop-up menus and drop-down lists.

Member Enumeration Documentation

Enumerator
Auto 
Above 
Below 

Member Function Documentation

void UIPopupList.Close ( )

Manually close the popup list.

delegate void UIPopupList.LegacyEvent ( string  val)
void UIPopupList.TriggerCallbacks ( )
protected

Trigger all event notification callbacks.

Member Data Documentation

NGUIText.Alignment UIPopupList.alignment = NGUIText.Alignment.Left

Label alignment to use.

UIAtlas UIPopupList.atlas

Atlas used by the sprites.

Color UIPopupList.backgroundColor = Color.white

Color tint applied to the background.

string UIPopupList.backgroundSprite

Name of the sprite used to create the popup's background.

UIFont UIPopupList.bitmapFont

Font used by the labels.

UIPopupList UIPopupList.current
static

Current popup list. Only available during the OnSelectionChange event callback.

int UIPopupList.fontSize = 16

Size of the font to use for the popup list's labels.

FontStyle UIPopupList.fontStyle = FontStyle.Normal

Font style used by the dynamic font.

Color UIPopupList.highlightColor = new Color(225f / 255f, 200f / 255f, 150f / 255f, 1f)

Color tint applied to the highlighter.

string UIPopupList.highlightSprite

Name of the sprite used to highlight items.

bool UIPopupList.isAnimated = true

Whether the popup list is animated or not. Disable for better performance.

bool UIPopupList.isLocalized = false

Whether the popup list's values will be localized.

List<string> UIPopupList.items = new List<string>()

New line-delimited list of items.

List<EventDelegate> UIPopupList.onChange = new List<EventDelegate>()

Callbacks triggered when the popup list gets a new item selection.

Vector2 UIPopupList.padding = new Vector3(4f, 4f)

Amount of padding added to labels.

Position UIPopupList.position = Position.Auto

Popup list's display style.

Color UIPopupList.textColor = Color.white

Color tint applied to labels inside the list.

Font UIPopupList.trueTypeFont

True type font used by the labels. Alternative to specifying a bitmap font ('font').

Property Documentation

Object UIPopupList.ambigiousFont
getset

Font used by the popup list. Conveniently wraps both dynamic and bitmap fonts into one property.

bool UIPopupList.isOpen
get

Whether the popup list is currently open.

LegacyEvent UIPopupList.onSelectionChange
getset
string UIPopupList.selection
getset
string UIPopupList.value
getset

Current selection.


The documentation for this class was generated from the following file: