C# Class FairyGUI.GButton

GButton class.
Inheritance: GComponent
Show file Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Properties

Property Type Description
changeStateOnClick bool
linkedPopup GObject
sound UnityEngine.AudioClip
soundVolumeScale float

Protected Properties

Property Type Description
_iconObject GObject
_relatedController FairyGUI.Controller
_titleObject GObject

Public Methods

Method Description
ConstructFromXML ( XML cxml ) : void
FireClick ( bool downEffect ) : void

Simulates a click on this button. 模拟点击这个按钮。

GButton ( ) : FairyGUI.Utils
HandleControllerChanged ( FairyGUI.Controller c ) : void
Setup_AfterAdd ( XML cxml ) : void

Protected Methods

Method Description
HandleGrayedChanged ( ) : void
SetCurrentState ( ) : void
SetState ( string val ) : void

Private Methods

Method Description
__SetState ( object val ) : void
__click ( ) : void
__removedFromStage ( ) : void
__rollout ( ) : void
__rollover ( ) : void
__touchBegin ( EventContext context ) : void
__touchEnd ( ) : void

Method Details

ConstructFromXML() public method

public ConstructFromXML ( XML cxml ) : void
cxml FairyGUI.Utils.XML
return void

FireClick() public method

Simulates a click on this button. 模拟点击这个按钮。
public FireClick ( bool downEffect ) : void
downEffect bool If the down effect will simulate too.
return void

GButton() public method

public GButton ( ) : FairyGUI.Utils
return FairyGUI.Utils

HandleControllerChanged() public method

public HandleControllerChanged ( FairyGUI.Controller c ) : void
c FairyGUI.Controller
return void

HandleGrayedChanged() protected method

protected HandleGrayedChanged ( ) : void
return void

SetCurrentState() protected method

protected SetCurrentState ( ) : void
return void

SetState() protected method

protected SetState ( string val ) : void
val string
return void

Setup_AfterAdd() public method

public Setup_AfterAdd ( XML cxml ) : void
cxml FairyGUI.Utils.XML
return void

Property Details

_iconObject protected property

protected GObject,FairyGUI _iconObject
return GObject

_relatedController protected property

protected Controller,FairyGUI _relatedController
return FairyGUI.Controller

_titleObject protected property

protected GObject,FairyGUI _titleObject
return GObject

changeStateOnClick public property

For radio or checkbox. if false, the button will not change selected status on click. Default is true. 如果为true,对于单选和多选按钮,当玩家点击时,按钮会自动切换状态。设置为false,则不会。默认为true。
public bool changeStateOnClick
return bool

linkedPopup public property

Show a popup on click. 可以为按钮设置一个关联的组件,当按钮被点击时,此组件被自动弹出。
public GObject,FairyGUI linkedPopup
return GObject

sound public property

Play sound when button is clicked.
public AudioClip,UnityEngine sound
return UnityEngine.AudioClip

soundVolumeScale public property

Volume of the click sound. (0-1)
public float soundVolumeScale
return float