Demo GUI fixes and improvements plus some shortcuts

-added option to override components (by remove them before adding)
-added shortcuts for tools
-fixed mouse scroll on WASM
-addding entity filtering option (WIP)
-added some tooltips
-remove Components duplicates in ComponentManipulator menu
-fixed ImGUI controls IDs
-added possibility to change values of component to add
This commit is contained in:
Mergul 2020-06-10 14:13:01 +02:00
parent e76c5ccdb2
commit 5018464a41
4 changed files with 237 additions and 100 deletions

View file

@ -852,10 +852,12 @@ void snakeStart()
launcher.gui_manager.addComponent(CApple(),"Apple");
launcher.gui_manager.addComponent(CSnake(),"Snake");
launcher.gui_manager.addComponent(CParticle(1000),"Particle (1s)");
launcher.gui_manager.addComponent(CParticleVector(vec2(0,1)),"Particle Vector (UP)");
launcher.gui_manager.addComponent(CParticle(1000),"Particle");
launcher.gui_manager.addComponent(CParticleVector(vec2(0,1)),"Particle Vector");
launcher.gui_manager.addComponent(CInput(),"Input");
launcher.gui_manager.addComponent(CMovement(CMovement.Direction.up),"Movement (UP)");
launcher.gui_manager.addComponent(CMovement(CMovement.Direction.up),"Movement");
//launcher.gui_manager.addComponent(CAnimation(),"Movement");
launcher.gui_manager.addComponent(CILocation(),"Int Location");
launcher.gui_manager.addSystem(MoveSystem.system_id,"Move System");
launcher.gui_manager.addSystem(InputSystem.system_id,"Input System");
@ -864,6 +866,8 @@ void snakeStart()
launcher.gui_manager.addSystem(AnimationSystem.system_id,"Animation System");
launcher.gui_manager.addSystem(ParticleSystem.system_id,"Particle Life System");
launcher.gui_manager.addSystem(ParticleMovementSystem.system_id,"Particle Movement System");
launcher.gui_manager.addSystem(DrawAppleSystem.system_id,"Draw Apple System");
launcher.gui_manager.addSystem(DrawSnakeSystem.system_id,"Draw Snake System");
snake.snake_destroy_particle_frames = Mallocator.makeArray([vec4(64,144,16,16)*px,vec4(80,144,16,16)*px,vec4(96,144,16,16)*px,vec4(112,144,16,16)*px].staticArray);