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

Go to the source code of this file.

Data Structures

struct  gmwScaleTheme
 Structure defining the visual theme for a scale (slider) widget. More...

Functions

int gmw_scale_anim (double x, double y, double width, double height, double *value, double *anim)
 Creates and renders an animated scale (slider) widget that can be manipulated with the mouse.

Variables

gmwScaleTheme gmwScale
 Global scale theme instance with default values.

Function Documentation

◆ gmw_scale_anim()

int gmw_scale_anim ( double x,
double y,
double width,
double height,
double * value,
double * anim )

Creates and renders an animated scale (slider) widget that can be manipulated with the mouse.

Parameters
xThe x-coordinate of the scale's center.
yThe y-coordinate of the scale's center.
widthThe width of the scale track.
heightThe height of the scale track.
valuePointer to a double to store the current scale value (0.0 to 1.0).
animPointer to a double for animated visual position (can be NULL to use value).
Returns
1 if the scale is currently being actively manipulated (mouse down), 0 otherwise.

Variable Documentation

◆ gmwScale

gmwScaleTheme gmwScale
Initial value:
= {.enabled = 1,
.scale = 1.0,
.background = 0x3A2A3AE0,
.border = 0x7F4F7FFF,
.focussed = {.scale = 1.03, .border = 0xAA77AAFF},
.active = {.scale = 0.97, .border = 0x7F4F7FFF},
.knob = 0xAA77AAFF,
.knob_border = 0x6F3F6FFF,
.border_width = 0.01,
.step = 0.0}

Global scale theme instance with default values.