bubel-ecs/demos/source/gui/component.d
Mergul e76c5ccdb2 Huge demos update
-moved C stdlib function definitions to ecs_utils.utils
-added function to calculate mix(linear interpolation) and rsqrt(fast inverse sqrt)
-added some math to vec2 (length, normalize...)
-improved renderer with possibility to use multiple materials (one per block, not perfect solution for parallel compute, but works with some requirements)
-added blending support for material (opaque, additive, mixed)
-added Android support
-added gprahical representation for mouse tools (tool_circle.d)
-added initial support for editing template components variables
-better Component and Templates listing
-added possibility to add/removes components using mouse
-move CLocation to game_core.basic and reuse in every test
-moved tools code from demos to App (now code is fully separated from demos!)
-some improvement and fixes in Snake demo, with additional systems to handle adding and removing entities
-added new demo: Particles. By now demo has several particles to spawn and support for attractors and vortexes (calculation is made as every attractor with every entity)
-fixed bug with window hover and tools
-improved tool behaviour
-added new material
-now window is always opened as maximized windowed mode
-some minor fixes and improvements
2020-06-06 22:46:29 +02:00

61 lines
847 B
D

module gui.component;
import ecs_utils.utils;
struct ComponentGUI
{
const (char)* name;
void* data;
ushort component_id;
}
struct ComponentEditGUI
{
const (char)* name;
VariableGUI[] variables;
uint used;
}
struct VariableGUI
{
struct Int
{
int min;
int max;
}
struct Float
{
float min;
float max;
}
struct Enum
{
const (char)[][] strings;
}
enum Type
{
byte_,
ubyte_,
short_,
ushort_,
int_,
uint_,
float_,
enum_,
color,
vec2,
ivec2
}
Type type;
const (char)* name;
ushort offset;
union
{
Int int_;
Float float_;
Enum enum_;
}
}