Button

A predefined component that may be used as one would normally expect Ensures that the mouse was clicked and released over the button Button doesn't handle timing of press or anything like that

Constructors

this
this(Display container, iRectangle location)

Makes a button given its location

Members

Functions

handleEvent
void handleEvent(SDL_Event event)

How the button determines when it has been pressed Collects events and if the events signify the button has been pressed, calls the button's action

Properties

isClicked
bool isClicked [@property getter]

Gets whether the mouse button is held down over this button

isHovered
bool isHovered [@property getter]

Gets whether the mouse is hovering over this button

location
iRectangle location [@property getter]

Gets where the button is on the screen

location
iRectangle location [@property setter]

Sets where the button is on the screen

Variables

_location
iRectangle _location;

Where the button is on the screen

Meta