tk2dUIToggleControl Class Reference

Toggle control that have both a toggle button and a description text. More...

Inherits tk2dUIToggleButton.

List of all members.

Static Public Member Functions

static void ChangeGameObjectActiveState (GameObject go, bool isActive)
 Used for SetActive so easily works between Unity 3.x and Unity 4.x.
static void ChangeGameObjectActiveStateWithNullCheck (GameObject go, bool isActive)
 Changes active state, but first checks to make sure it isn't null.

Public Attributes

tk2dTextMesh descriptionTextMesh
 Description of the toggle button.
GameObject offStateGO
 State that will be active if toggled off, deactivated if toggle on.
GameObject onStateGO
 State to be active if toggled on, deactivated if toggle off.
bool activateOnPress = false
 If false toggles on click, if true toggles on button down.
tk2dUIItem uiItem
 Button(uiItem) for this control.

Properties

bool IsOn [get, set]
 Is toggle in On state.
bool IsInToggleGroup [get, set]
 If toggle is parent of toggle group.

Events

System.Action< tk2dUIToggleButton > OnToggle
 Event, if toggled.

Detailed Description

Toggle control that have both a toggle button and a description text.


Member Function Documentation

static void tk2dUIBaseItemControl.ChangeGameObjectActiveState ( GameObject  go,
bool  isActive 
) [static, inherited]

Used for SetActive so easily works between Unity 3.x and Unity 4.x.

static void tk2dUIBaseItemControl.ChangeGameObjectActiveStateWithNullCheck ( GameObject  go,
bool  isActive 
) [static, inherited]

Changes active state, but first checks to make sure it isn't null.


Member Data Documentation

bool tk2dUIToggleButton.activateOnPress = false [inherited]

If false toggles on click, if true toggles on button down.

Description of the toggle button.

GameObject tk2dUIToggleButton.offStateGO [inherited]

State that will be active if toggled off, deactivated if toggle on.

GameObject tk2dUIToggleButton.onStateGO [inherited]

State to be active if toggled on, deactivated if toggle off.

Button(uiItem) for this control.


Property Documentation

bool tk2dUIToggleButton.IsInToggleGroup [get, set, inherited]

If toggle is parent of toggle group.

bool tk2dUIToggleButton.IsOn [get, set, inherited]

Is toggle in On state.


Event Documentation

System.Action<tk2dUIToggleButton> tk2dUIToggleButton.OnToggle [inherited]

Event, if toggled.