Make common draw system, moved some components to basic components and fixed bug with GUI for signed short integers

This commit is contained in:
Mergul 2020-06-12 20:51:05 +02:00
parent 3a7a5b2a21
commit d733bb514c
5 changed files with 326 additions and 86 deletions

View file

@ -4,6 +4,8 @@ import bubel.ecs.core;
import ecs_utils.math.vector;
import gui.attributes;
struct CLocation
{
mixin ECS.Component;
@ -11,4 +13,47 @@ struct CLocation
alias value this;
vec2 value = vec2(0);
}
struct CScale
{
mixin ECS.Component;
alias value this;///use component as it value
vec2 value = vec2(16,16);
}
struct CRotation
{
mixin ECS.Component;
alias value this;///use component as it value
float value = 0;
}
struct CDepth
{
mixin ECS.Component;
alias value this;
short value;
}
struct CColor
{
mixin ECS.Component;
alias value this;
@GUIColor uint value;
}
struct CSelected
{
mixin ECS.Component;
bool value = false;
}