gui.guibutton

Button widget.

enum ButtonState;

States a button can be in.

Normal

Normal (default) state.

MouseOver

Mouse is above the button.

Clicked

Mouse is clicking or holding the button.

class GUIButton: gui.guielement.GUIElement;

Simple clickable button with text.

Signal:
public mixin Signal!() pressed
Emitted when this button is pressed.

protected this(const(GUIElementParams) params, const(immutable(char)[]) text, const(uint) fontSize, const(State[3LU]) states);

Construct a button with specified parameters.

Parameters:
const(GUIElementParams) params Parameters for GUIElement constructor.
const(immutable(char)[]) text Button text.
const(uint) fontSize Font size of the button text.
const(State[3LU]) states Color data for each button state.
class GUIButtonFactory: gui.guielement.GUIElementFactoryBase!(GUIButton).GUIElementFactoryBase;

Factory used for button construction.

SeeAlso:
GUIElementFactoryBase

Parameters:
text Button text. Default; ""
fontSize Font size of the button text.
textColor Text color for specified button state.
borderColor Border color for specified button state.
this();

Construct a GUIButtonFactory.

GUIButton produce();

Produce a GUIButton with parameters of the factory.