Table of Contents

Class ButtonNode

Namespace
Fantas.UI
Assembly
Fantas.dll

Button Node

public class ButtonNode : ControlNode
Inheritance
ButtonNode
Inherited Members
Extension Methods

Constructors

ButtonNode()

Construct ButtonNode

public ButtonNode()

Properties

DisabledTexture

Default Disabled ButtonNode texture

public static Texture DisabledTexture { get; }

Property Value

Texture

HoverTexture

Default Hover ButtonNode texture

public static Texture HoverTexture { get; }

Property Value

Texture

LabelNode

Button Label

public LabelNode LabelNode { get; }

Property Value

LabelNode

NormalTexture

Default Normal ButtonNode texture

public static Texture NormalTexture { get; }

Property Value

Texture

PressedTexture

Default Pressed ButtonNode texture

public static Texture PressedTexture { get; }

Property Value

Texture

Text

Button text

public string Text { get; set; }

Property Value

string

TextColor

Button text color

public Color TextColor { get; set; }

Property Value

Color

Methods

OnClick(MouseEventArgs)

Node override to call Press

public override void OnClick(MouseEventArgs args)

Parameters

args MouseEventArgs

OnPressed()

Called when Button is pressed

public virtual void OnPressed()

OnStateChanged()

Update Button Texture on state change

protected override void OnStateChanged()

OnTouchUpInside(TouchEventArgs)

Node override to call Press

public override void OnTouchUpInside(TouchEventArgs args)

Parameters

args TouchEventArgs

Press()

Trigger button pressed event

public void Press()

Events

Pressed

Event called when Button is pressed

public event EventHandler<EventArgs> Pressed

Event Type

EventHandler<EventArgs>