2023-07-05 08:37:27 +00:00
|
|
|
#ifndef __UI
|
|
|
|
#define __UI
|
2023-07-03 15:40:28 +00:00
|
|
|
#include "vec.h"
|
|
|
|
|
2023-07-05 08:37:27 +00:00
|
|
|
typedef struct _ui_position {
|
|
|
|
vec3 relative;
|
|
|
|
vec3 absolute;
|
|
|
|
} ui_pos;
|
|
|
|
|
|
|
|
typedef struct _ui_slider {
|
|
|
|
ui_pos position;
|
|
|
|
/* x - width, y - height, z - middle circle radius */
|
|
|
|
vec3 size;
|
|
|
|
float value; // Value will always range between 0 and 1
|
|
|
|
} ui_slider;
|
|
|
|
|
|
|
|
void ui_slider_draw(ui_slider* s);
|
2023-07-05 09:24:14 +00:00
|
|
|
char ui_slider_mouse_over(ui_slider* s, int mouseX, int mouseY);
|
2023-07-06 08:24:46 +00:00
|
|
|
void ui_slider_onclick(ui_slider* s, int mouseX, int mouseY);
|
2023-07-05 08:37:27 +00:00
|
|
|
|
2023-07-03 15:40:28 +00:00
|
|
|
#endif
|