#include "../animate.h"
#include "../collision.h"
#include "../draw.h"
Go to the source code of this file.
|
| int | gmw_switch_anim (double x, double y, double width, double height, int *value, double *anim) |
| | Creates and renders an animated switch widget that toggles on click.
|
| int | gmw_switch (double x, double y, double width, double height, int *value) |
| | Creates and renders a switch widget that toggles on click.
|
◆ gmw_switch()
| int gmw_switch |
( |
double | x, |
|
|
double | y, |
|
|
double | width, |
|
|
double | height, |
|
|
int * | value ) |
Creates and renders a switch widget that toggles on click.
- Parameters
-
| x | The x-coordinate of the switch's center. |
| y | The y-coordinate of the switch's center. |
| width | The width of the switch. |
| height | The height of the switch. |
| value | Pointer to an integer to store the switch state (0=off, 1=on). |
- Returns
- 1 if the switch was clicked (toggled), 0 otherwise.
◆ gmw_switch_anim()
| int gmw_switch_anim |
( |
double | x, |
|
|
double | y, |
|
|
double | width, |
|
|
double | height, |
|
|
int * | value, |
|
|
double * | anim ) |
Creates and renders an animated switch widget that toggles on click.
- Parameters
-
| x | The x-coordinate of the switch's center. |
| y | The y-coordinate of the switch's center. |
| width | The width of the switch. |
| height | The height of the switch. |
| value | Pointer to an integer to store the switch state (0=off, 1=on). |
| anim | Pointer to a double for animated visual position (can be NULL to use value). |
- Returns
- 1 if the switch was clicked (toggled), 0 otherwise.
◆ gmwSwitch
Global switch theme instance with default values.