UIElementType
UI Element Types enumeration.
Definition UI.h:35
@ UI_ELEMENT_IMAGE
Definition UI.h:43
@ UI_ELEMENT_TEXT
Definition UI.h:42
@ UI_ELEMENT_LABEL
Definition UI.h:39
@ UI_ELEMENT_SLIDER
Definition UI.h:41
@ UI_ELEMENT_NONE
Definition UI.h:36
@ UI_ELEMENT_BUTTON
Definition UI.h:38
@ UI_ELEMENT_CHECKBOX
Definition UI.h:40
@ UI_ELEMENT_PANEL
Definition UI.h:37
UI Element structure.
Definition UI.h:55
SDL_Rect rect
Common properties.
Definition UI.h:61
void(* update)(UIElement *self)
Update logic.
Definition UI.h:76
SDL_Color color
Color tint/modulation.
Definition UI.h:71
bool hovered
Is mouse over this element?
Definition UI.h:64
bool pressed
Is mouse button pressed on this element?
Definition UI.h:65
UIElementType type
Element-specific data (depends on type)
Definition UI.h:57
void(* render)(UIElement *self)
Render function.
Definition UI.h:75
bool visible
Is this element visible?
Definition UI.h:62
void * data
Pointer to element-specific data.
Definition UI.h:58
SDL_Rect dstRect
Destination rectangle for rendering.
Definition UI.h:69
SDL_Rect srcRect
Rendering properties.
Definition UI.h:68
SDL_Rect textureSize
Texture size.
Definition UI.h:70
bool enabled
Is this element interactive?
Definition UI.h:63
void(* cleanup)(UIElement *self)
Free resources.
Definition UI.h:77
float scale
Scale factor for the texture.
Definition UI.h:72
Provides 2D vector functionality for positions, directions, and transformations.