47 .background = 0xAA77AAFF,
55 .background = 0xBA87BAFF,
64 .background = 0x9B5F9BFF,
73 .background = 0x9A8F9AFF,
78 .border_thickness = 0.01,
79 .font =
"default-ui"};
91int gmw_button(
double x,
double y,
double width,
double height,
92 const char *text,
double fontsize) {
97 int clicked = enabled &&
gm_mouse.down && hovered;
106 : hovered ?
gmwButton.focussed.background
120 double sw = width * scale;
121 double sh = height * scale;
125 sh +
gmwButton.border_thickness * 2, border);
int gm_mouse_in_rect(const double x, const double y, const double w, const double h)
Definition collision.h:102
unsigned int gmColor
Type definition for color values in RGBA format.
Definition color.h:8
#define GM_WHITE
White color.
Definition color.h:851
Functions for drawing shapes, text, and images.
int32_t gm_draw_text(double x, double y, const char *text, const char *font, double font_size, gmColor c)
Draws text.
Definition draw.h:135
int32_t gm_draw_rectangle(double x, double y, double w, double h, gmColor c)
Draws a rectangle.
Definition draw.h:47
struct _gmMouse gm_mouse
Definition gapi.h:19