Gama C Library
Gama C API Documentation
Loading...
Searching...
No Matches
button.h File Reference
#include "../collision.h"
#include "../draw.h"

Go to the source code of this file.

Data Structures

struct  gmwButtonTheme
 Structure defining the visual theme for a button widget. More...

Functions

int gmw_button (double x, double y, double width, double height, const char *text, double fontsize)
 Creates and renders an interactive button widget.

Variables

gmwButtonTheme gmwButton
 Global button theme instance with default values.

Function Documentation

◆ gmw_button()

int gmw_button ( double x,
double y,
double width,
double height,
const char * text,
double fontsize )

Creates and renders an interactive button widget.

Parameters
xThe x-coordinate of the button's center.
yThe y-coordinate of the button's center.
widthThe width of the button.
heightThe height of the button.
textThe text to display on the button (can be NULL).
fontsizeThe size of the text font.
Returns
1 if the button is currently hovered, 0 otherwise.

Variable Documentation

◆ gmwButton

gmwButtonTheme gmwButton

Global button theme instance with default values.