CheckBox

Undocumented in source.

Constructors

this
this(wstring text, float x, float y, int width, int height)
Undocumented in source.
this
this(wstring text, vec2 position, Size!int size)
Undocumented in source.

Members

Functions

draw
void draw(float deltaTime)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseLeave
void onMouseLeave()

Event called when mouse leaves control's rect

onMouseMove
void onMouseMove(vec2 mousePosition)

Event called when mouse enters in control's rect

onMouseUp
void onMouseUp(MouseButton mouseButton)

Event called on mouse button release

Properties

checked
bool checked [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
color
Color color [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Control

Dock
enum Dock
Undocumented in source.
OnClickEvent
alias OnClickEvent = void delegate(Control sender)
Undocumented in source.
OnDragEvent
alias OnDragEvent = void delegate(Control sender, vec2 mousePosition)
Undocumented in source.
OnDropEvent
alias OnDropEvent = void delegate(Control sender, vec2 mousePosition)
Undocumented in source.
m_onClickEvent
OnClickEvent m_onClickEvent;
Undocumented in source.
m_onDoubleClickEvent
OnClickEvent m_onDoubleClickEvent;
Undocumented in source.
m_onDragEvent
OnDragEvent m_onDragEvent;
Undocumented in source.
m_onDropEvent
OnDropEvent m_onDropEvent;
Undocumented in source.
m_nvg
NVGcontext* m_nvg;

NanoVG context

m_theme
Theme m_theme;

Control theme

m_parent
Control m_parent;

Parent control

m_name
string m_name;

Control name, used in GuiManager when loading themes

m_position
vec2 m_position;

Control position

m_realPosition
vec2 m_realPosition;

Control real position for borders in shader

m_positionBeforeDragAndDrop
vec2 m_positionBeforeDragAndDrop;

Control position before drag and drop

m_size
Size!int m_size;

Control size

m_texture
Texture m_texture;

Control texture

m_hasFocus
bool m_hasFocus;

Is control under the mouse ?

m_isVisible
bool m_isVisible;

Is control displayed ?

m_isEnabled
bool m_isEnabled;

Is control enabled ?

m_isFocusable
bool m_isFocusable;

Is control focusable ?

m_initialized
bool m_initialized;

Control has been initialized ?

m_movable
bool m_movable;

Control can be moved with mouse ?

m_opacity
ubyte m_opacity;

Control opacity

m_dock
Dock m_dock;

Dock

m_tooltipText
wstring m_tooltipText;

Control tooltip

m_textureCoords
Rectangle!float m_textureCoords;

Texture coords

m_contextMenu
ContextMenuStrip m_contextMenu;

ContextMenu for this control

m_mousePosition
vec2 m_mousePosition;

Last mouse position

m_fillColor
Color m_fillColor;

Current fill color

m_mouseButtonsStates
bool[MouseButton] m_mouseButtonsStates;

Clicked buttons

m_lastClickedMouseButton
MouseButton m_lastClickedMouseButton;

Last mouse button clicked

m_draggingMouseButton
Nullable!MouseButton m_draggingMouseButton;

Mouse button used to drag current control

m_zIndex
uint m_zIndex;

z-index

m_animationSet
AnimationSet m_animationSet;

Control animations

update
void update(float deltaTime)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(float deltaTime)

Draws the control

onMouseClick
void onMouseClick(MouseButton mouseButton, vec2 mousePosition)

Event called on mouse button click

onMouseUp
void onMouseUp(MouseButton mouseButton)

Event called on mouse button release

onMouseMove
void onMouseMove(vec2 mousePosition)

Event called when mouse enters in control's rect

onMouseLeave
void onMouseLeave()

Event called when mouse leaves control's rect

onText
void onText(int key)

Event called on character input

onKey
void onKey(int key)

Event called on key input

onDrag
void onDrag(vec2 mousePosition)

Event called when control has been dragged

onDrop
void onDrop(vec2 mousePosition)

Event called when control has been dropped

onFocus
void onFocus()

Control gains focus

onUnfocus
void onUnfocus()

Control lose focus

canBeDragged
bool canBeDragged()

Condition for drag and drop of this control

initialize
void initialize()

Initializes control

show
void show()

Displays the control

hide
void hide()

Hides the control

focus
void focus()

Gives focus to the control

unfocus
void unfocus()

Removes focus from the control

enable
void enable()

Enables the control

disable
void disable()

Disables the control

switchState
void switchState()

Switchs control state

startAnimation
void startAnimation(Animation animation)

Starts a single animation

startAnimation
void startAnimation(AnimationSet animationSet)

Starts a set of animations

opacity
ubyte opacity [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
nvg
NVGcontext* nvg [@property setter]

Properties

theme
Theme theme [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
theme
Theme theme [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
uint id [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
uint id [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
opacity
ubyte opacity [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
position
const(vec2) position [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
position
vec2 position [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
realPosition
const(vec2) realPosition [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
realPosition
vec2 realPosition [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
positionBeforeDragAndDrop
const(vec2) positionBeforeDragAndDrop [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
positionBeforeDragAndDrop
vec2 positionBeforeDragAndDrop [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
size
const(Size!int) size [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
size
Size!int size [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
texture
Texture texture [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
texture
Texture texture [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
hasFocus
bool hasFocus [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isVisible
bool isVisible [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isVisible
bool isVisible [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
parent
Control parent [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
parent
Control parent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
isClicked
bool isClicked [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isEnabled
bool isEnabled [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
movable
bool movable [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
movable
bool movable [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
isFocusable
bool isFocusable [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isFocusable
bool isFocusable [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
dock
Dock dock [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
dock
Dock dock [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
onClickEvent
OnClickEvent onClickEvent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
onDoubleClickEvent
OnClickEvent onDoubleClickEvent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
tooltipText
wstring tooltipText [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
tooltipText
wstring tooltipText [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
tooltipText
string tooltipText [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
contextMenu
ContextMenuStrip contextMenu [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
onDragEvent
OnDragEvent onDragEvent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
onDropEvent
OnDropEvent onDropEvent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
textureCoords
Rectangle!float textureCoords [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
name
string name [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
mouseButtonsStates
const(bool[MouseButton]) mouseButtonsStates [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
lastClickedMouseButton
MouseButton lastClickedMouseButton [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
draggingMouseButton
Nullable!MouseButton draggingMouseButton [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
fillColor
const(Color) fillColor [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
fillColor
Color fillColor [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
zIndex
uint zIndex [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
zIndex
uint zIndex [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta