world_of_cow/ui.h

21 lines
489 B
C

#ifndef __UI
#define __UI
#include "vec.h"
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);
char ui_slider_mouse_over(ui_slider* s, int mouseX, int mouseY);
void ui_slider_onclick(ui_slider* s, int mouseX, int mouseY);
#endif