This commit is contained in:
Alessandro Mauri 2024-10-31 13:04:30 +01:00
parent f48151b38e
commit 28598f0575
6 changed files with 106 additions and 8 deletions

View file

@ -23,6 +23,7 @@ enum ElemType {
ETYPE_NONE,
ETYPE_DIV,
ETYPE_BUTTON,
ETYPE_SLIDER,
}
bitstruct ElemFlags : uint {
@ -39,6 +40,7 @@ bitstruct ElemEvents : uint {
bool mouse_press : 4;
bool mouse_release : 5;
bool mouse_hold : 6;
bool update : 7;
}
enum DivLayout {
@ -54,6 +56,12 @@ struct Div {
Color color_bg;
}
// slider element
struct Slider {
float value;
Rect handle;
}
// element structure
struct Elem {
Id id;
@ -63,6 +71,7 @@ struct Elem {
ElemType type;
union {
Div div;
Slider slider;
}
}