Button

button UI element

Members

Functions

CreateCopy
Button CreateCopy()

copies this UI element to a new class instance

HandleEvent
bool HandleEvent(Project project, SDL_Event e)
Undocumented in source. Be warned that the author may not have intended to support it.
OnButton
bool OnButton(Vec2!int pos)

checks if a position is inside the button

Render
void Render(Project project)
Undocumented in source. Be warned that the author may not have intended to support it.
SetLabel
void SetLabel(string newLabel)

sets the button's label

Variables

fill
SDL_Color fill;

the background colour of the button

fillHover
SDL_Color fillHover;

the colour of the button fill when the cursor is hovering on it

labelColour
SDL_Color labelColour;

the colour of the label text

onClick
ButtonOnClick onClick;

called when the button is clicked

outline
SDL_Color outline;

the colour of the button outline

outlineHover
SDL_Color outlineHover;

the colour of the button outline when the cursor is hovering on it

rect
SDL_Rect rect;

the rectangle the button will be rendered in

Meta