C# Класс Nez.UI.Button

Наследование: Table, IInputListener, IGamepadFocusable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
buttonBoundaryThreshold float
programmaticChangeEvents bool

Защищенные свойства (Protected)

Свойство Тип Описание
_isChecked bool
_isDisabled bool
_mouseOver bool

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
onActionButtonPressed ( ) : void
onActionButtonReleased ( ) : void
onFocused ( ) : void
onUnfocused ( ) : void

Приватные методы

Метод Описание
IInputListener ( Vector2 mousePos ) : bool
IInputListener ( int mouseWheelDelta ) : bool

Описание методов

Button() публичный Метод

public Button ( ButtonStyle style ) : System
style ButtonStyle
Результат System

Button() публичный Метод

public Button ( IDrawable up ) : System
up IDrawable
Результат System

Button() публичный Метод

public Button ( IDrawable up, IDrawable down ) : System
up IDrawable
down IDrawable
Результат System

Button() публичный Метод

public Button ( IDrawable up, IDrawable down, IDrawable checked_ ) : System
up IDrawable
down IDrawable
checked_ IDrawable
Результат System

Button() публичный Метод

public Button ( Skin skin, string styleName = null ) : System
skin Skin
styleName string
Результат System

IGamepadFocusable() публичный Метод

public IGamepadFocusable ( ) : void
Результат void

IGamepadFocusable() публичный Метод

public IGamepadFocusable ( Direction direction ) : void
direction Direction
Результат void

IInputListener() публичный Метод

public IInputListener ( ) : void
Результат void

IInputListener() публичный Метод

public IInputListener ( Vector2 mousePos ) : void
mousePos Vector2
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

draw() публичный Метод

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
Результат void

enableExplicitFocusableControl() публичный Метод

public enableExplicitFocusableControl ( IGamepadFocusable upEle, IGamepadFocusable downEle, IGamepadFocusable leftEle, IGamepadFocusable rightEle ) : void
upEle IGamepadFocusable
downEle IGamepadFocusable
leftEle IGamepadFocusable
rightEle IGamepadFocusable
Результат void

getButtonGroup() публичный Метод

May be null
public getButtonGroup ( ) : ButtonGroup
Результат ButtonGroup

getDisabled() публичный Метод

public getDisabled ( ) : bool
Результат bool

getStyle() публичный Метод

Returns the button's style. Modifying the returned style may not have an effect until {@link #setStyle(ButtonStyle)} is called.
public getStyle ( ) : ButtonStyle
Результат ButtonStyle

onActionButtonPressed() защищенный Метод

protected onActionButtonPressed ( ) : void
Результат void

onActionButtonReleased() защищенный Метод

protected onActionButtonReleased ( ) : void
Результат void

onFocused() защищенный Метод

protected onFocused ( ) : void
Результат void

onUnfocused() защищенный Метод

protected onUnfocused ( ) : void
Результат void

setChecked() публичный Метод

public setChecked ( bool isChecked, bool fireEvent ) : void
isChecked bool
fireEvent bool
Результат void

setDisabled() публичный Метод

public setDisabled ( bool disabled ) : void
disabled bool
Результат void

setStyle() публичный Метод

public setStyle ( ButtonStyle style ) : void
style ButtonStyle
Результат void

toggle() публичный Метод

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
Результат void

Описание свойств

_isChecked защищенное свойство

protected bool _isChecked
Результат bool

_isDisabled защищенное свойство

protected bool _isDisabled
Результат bool

_mouseOver защищенное свойство

protected bool _mouseOver
Результат bool

buttonBoundaryThreshold публичное свойство

the maximum distance outside the button the mouse can move when pressing it to cause it to be unfocused
public float buttonBoundaryThreshold
Результат float

programmaticChangeEvents публичное свойство

public bool programmaticChangeEvents
Результат bool