C# Class Nez.UI.Button

Inheritance: Table, IInputListener, IGamepadFocusable
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
buttonBoundaryThreshold float
programmaticChangeEvents bool

Protected Properties

Свойство Type Description
_isChecked bool
_isDisabled bool
_mouseOver bool

Méthodes publiques

Méthode Description
Button ( ButtonStyle style ) : System
Button ( IDrawable up ) : System
Button ( IDrawable up, IDrawable down ) : System
Button ( IDrawable up, IDrawable down, IDrawable checked_ ) : System
Button ( Skin skin, string styleName = null ) : System
IGamepadFocusable ( ) : void
IGamepadFocusable ( Direction direction ) : void
IInputListener ( ) : void
IInputListener ( Vector2 mousePos ) : void
ToString ( ) : string
draw ( Graphics graphics, float parentAlpha ) : void
enableExplicitFocusableControl ( IGamepadFocusable upEle, IGamepadFocusable downEle, IGamepadFocusable leftEle, IGamepadFocusable rightEle ) : void
getButtonGroup ( ) : ButtonGroup

May be null

getDisabled ( ) : bool
getStyle ( ) : ButtonStyle

Returns the button's style. Modifying the returned style may not have an effect until {@link #setStyle(ButtonStyle)} is called.

setChecked ( bool isChecked, bool fireEvent ) : void
setDisabled ( bool disabled ) : void
setStyle ( ButtonStyle style ) : void
toggle ( ) : void

Toggles the checked state. This method changes the checked state, which fires a {@link onChangedEvent} (if programmatic change events are enabled), so can be used to simulate a button click.

Méthodes protégées

Méthode Description
onActionButtonPressed ( ) : void
onActionButtonReleased ( ) : void
onFocused ( ) : void
onUnfocused ( ) : void

Private Methods

Méthode Description
IInputListener ( Vector2 mousePos ) : bool
IInputListener ( int mouseWheelDelta ) : bool

Method Details

Button() public méthode

public Button ( ButtonStyle style ) : System
style ButtonStyle
Résultat System

Button() public méthode

public Button ( IDrawable up ) : System
up IDrawable
Résultat System

Button() public méthode

public Button ( IDrawable up, IDrawable down ) : System
up IDrawable
down IDrawable
Résultat System

Button() public méthode

public Button ( IDrawable up, IDrawable down, IDrawable checked_ ) : System
up IDrawable
down IDrawable
checked_ IDrawable
Résultat System

Button() public méthode

public Button ( Skin skin, string styleName = null ) : System
skin Skin
styleName string
Résultat System

IGamepadFocusable() public méthode

public IGamepadFocusable ( ) : void
Résultat void

IGamepadFocusable() public méthode

public IGamepadFocusable ( Direction direction ) : void
direction Direction
Résultat void

IInputListener() public méthode

public IInputListener ( ) : void
Résultat void

IInputListener() public méthode

public IInputListener ( Vector2 mousePos ) : void
mousePos Vector2
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

draw() public méthode

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
Résultat void

enableExplicitFocusableControl() public méthode

public enableExplicitFocusableControl ( IGamepadFocusable upEle, IGamepadFocusable downEle, IGamepadFocusable leftEle, IGamepadFocusable rightEle ) : void
upEle IGamepadFocusable
downEle IGamepadFocusable
leftEle IGamepadFocusable
rightEle IGamepadFocusable
Résultat void

getButtonGroup() public méthode

May be null
public getButtonGroup ( ) : ButtonGroup
Résultat ButtonGroup

getDisabled() public méthode

public getDisabled ( ) : bool
Résultat bool

getStyle() public méthode

Returns the button's style. Modifying the returned style may not have an effect until {@link #setStyle(ButtonStyle)} is called.
public getStyle ( ) : ButtonStyle
Résultat ButtonStyle

onActionButtonPressed() protected méthode

protected onActionButtonPressed ( ) : void
Résultat void

onActionButtonReleased() protected méthode

protected onActionButtonReleased ( ) : void
Résultat void

onFocused() protected méthode

protected onFocused ( ) : void
Résultat void

onUnfocused() protected méthode

protected onUnfocused ( ) : void
Résultat void

setChecked() public méthode

public setChecked ( bool isChecked, bool fireEvent ) : void
isChecked bool
fireEvent bool
Résultat void

setDisabled() public méthode

public setDisabled ( bool disabled ) : void
disabled bool
Résultat void

setStyle() public méthode

public setStyle ( ButtonStyle style ) : void
style ButtonStyle
Résultat void

toggle() public méthode

Toggles the checked state. This method changes the checked state, which fires a {@link onChangedEvent} (if programmatic change events are enabled), so can be used to simulate a button click.
public toggle ( ) : void
Résultat void

Property Details

_isChecked protected_oe property

protected bool _isChecked
Résultat bool

_isDisabled protected_oe property

protected bool _isDisabled
Résultat bool

_mouseOver protected_oe property

protected bool _mouseOver
Résultat bool

buttonBoundaryThreshold public_oe property

the maximum distance outside the button the mouse can move when pressing it to cause it to be unfocused
public float buttonBoundaryThreshold
Résultat float

programmaticChangeEvents public_oe property

public bool programmaticChangeEvents
Résultat bool