C# Class UIPopupList, LoopScorllViewForNGUI

Inheritance: MonoBehaviour
Show file Open project: tinyantstudio/LoopScorllViewForNGUI Class Usage Examples

Public Properties

Property Type Description
alignment NGUIText.Alignment
atlas UIAtlas,
backgroundColor Color
backgroundSprite string
bitmapFont UIFont,
current UIPopupList,
fontSize int
fontStyle FontStyle,
highlightColor Color
highlightSprite string
isAnimated bool
isLocalized bool
items List
onChange List
padding Vector2
position Position,
textColor Color
trueTypeFont Font

Private Properties

Property Type Description
Animate void
AnimateColor void
AnimatePosition void
AnimateScale void
GetHighlightPosition Vector3
Highlight void
OnClick void
OnEnable void
OnItemClick void
OnItemHover void
OnItemPress void
OnKey void
OnLocalize void
OnSelect void
OnValidate void
Select void
Start void
UpdateTweenPosition IEnumerator

Public Methods

Method Description
Close ( ) : void

Manually close the popup list.

Protected Methods

Method Description
TriggerCallbacks ( ) : void

Trigger all event notification callbacks.

Private Methods

Method Description
Animate ( UIWidget, widget, bool placeAbove, float bottom ) : void

Helper function used to animate widgets.

AnimateColor ( UIWidget, widget ) : void

Helper function that causes the widget to smoothly fade in.

AnimatePosition ( UIWidget, widget, bool placeAbove, float bottom ) : void

Helper function that causes the widget to smoothly move into position.

AnimateScale ( UIWidget, widget, bool placeAbove, float bottom ) : void

Helper function that causes the widget to smoothly grow until it reaches its original size.

GetHighlightPosition ( ) : Vector3

Helper function that calculates where the tweened position should be.

Highlight ( UILabel, lbl, bool instant ) : void

Visibly highlight the specified transform by moving the highlight sprite to be over it.

OnClick ( ) : void

Display the drop-down list when the game object gets clicked on.

OnEnable ( ) : void

Remove legacy functionality.

OnItemClick ( GameObject go ) : void

Close the popup list on click.

OnItemHover ( GameObject go, bool isOver ) : void

Event function triggered when the mouse hovers over an item.

OnItemPress ( GameObject go, bool isPressed ) : void

Event function triggered when the drop-down list item gets clicked on.

OnKey ( KeyCode, key ) : void

React to key-based input.

OnLocalize ( ) : void

Localize the text label.

OnSelect ( bool isSelected ) : void

Get rid of the popup dialog when the selection gets lost.

OnValidate ( ) : void
Select ( UILabel, lbl, bool instant ) : void

Select the specified label.

Start ( ) : void

Send out the selection message on start.

UpdateTweenPosition ( ) : IEnumerator

Periodically update the tweened target position. It's needed because the popup list animates into view, and the target position changes.

Method Details

Close() public method

Manually close the popup list.
public Close ( ) : void
return void

TriggerCallbacks() protected method

Trigger all event notification callbacks.
protected TriggerCallbacks ( ) : void
return void

Property Details

alignment public property

Label alignment to use.
public NGUIText.Alignment alignment
return NGUIText.Alignment

atlas public property

Atlas used by the sprites.
public UIAtlas, atlas
return UIAtlas,

backgroundColor public property

Color tint applied to the background.
public Color backgroundColor
return Color

backgroundSprite public property

Name of the sprite used to create the popup's background.
public string backgroundSprite
return string

bitmapFont public property

Font used by the labels.
public UIFont, bitmapFont
return UIFont,

current static public property

Current popup list. Only available during the OnSelectionChange event callback.
static public UIPopupList, current
return UIPopupList,

fontSize public property

Size of the font to use for the popup list's labels.
public int fontSize
return int

fontStyle public property

Font style used by the dynamic font.
public FontStyle, fontStyle
return FontStyle,

highlightColor public property

Color tint applied to the highlighter.
public Color highlightColor
return Color

highlightSprite public property

Name of the sprite used to highlight items.
public string highlightSprite
return string

isAnimated public property

Whether the popup list is animated or not. Disable for better performance.
public bool isAnimated
return bool

isLocalized public property

Whether the popup list's values will be localized.
public bool isLocalized
return bool

items public property

New line-delimited list of items.
public List items
return List

onChange public property

Callbacks triggered when the popup list gets a new item selection.
public List onChange
return List

padding public property

Amount of padding added to labels.
public Vector2 padding
return Vector2

position public property

Popup list's display style.
public Position, position
return Position,

textColor public property

Color tint applied to labels inside the list.
public Color textColor
return Color

trueTypeFont public property

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