1 module gui.component; 2 3 import ecs_utils.utils; 4 5 struct ComponentGUI 6 { 7 const (char)* name; 8 void* data; 9 ushort component_id; 10 } 11 12 struct ComponentEditGUI 13 { 14 const (char)* name; 15 VariableGUI[] variables; 16 uint used; 17 } 18 19 struct VariableGUI 20 { 21 struct Int 22 { 23 int min; 24 int max; 25 } 26 27 struct Float 28 { 29 float min; 30 float max; 31 } 32 33 struct Enum 34 { 35 const (char)[][] strings; 36 } 37 38 enum Type 39 { 40 byte_, 41 ubyte_, 42 short_, 43 ushort_, 44 int_, 45 uint_, 46 float_, 47 enum_, 48 color, 49 vec2, 50 ivec2, 51 vec4, 52 ivec4 53 } 54 Type type; 55 const (char)* name; 56 ushort offset; 57 bool disabled = false; 58 union 59 { 60 Int int_; 61 Float float_; 62 Enum enum_; 63 } 64 }