-updated wasm build scripts
-multitheaded wasm tests -updated dub.json -fixed thread pool assert issue -added windows libraries -added demos: *launcher *simple *snake *space invaders (WIP) *statistics window *changable gui styles *tips window *profile window *demo window with automatic generation *multithreaded job updater
This commit is contained in:
parent
cb7609dcaa
commit
5894e76540
26 changed files with 2562 additions and 20 deletions
6
demos/source/gui/component.d
Normal file
6
demos/source/gui/component.d
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module gui.components;
|
||||
|
||||
struct ComponentGUI
|
||||
{
|
||||
|
||||
}
|
||||
49
demos/source/gui/manager.d
Normal file
49
demos/source/gui/manager.d
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
module gui.manager;
|
||||
|
||||
import app;
|
||||
|
||||
import cimgui.cimgui;
|
||||
|
||||
import ecs.std;
|
||||
import ecs.system;
|
||||
import ecs.vector;
|
||||
|
||||
import gui.system;
|
||||
|
||||
extern(C):
|
||||
|
||||
struct GUIManager
|
||||
{
|
||||
Vector!SystemGUI systems;
|
||||
|
||||
void clear()
|
||||
{
|
||||
systems.clear();
|
||||
}
|
||||
|
||||
void addSystem(ushort id, const (char)* name, bool enabled = true)
|
||||
{
|
||||
System* system = launcher.manager.getSystem(id);
|
||||
//const (char)* name =
|
||||
systems.add(SystemGUI(name,system,enabled));
|
||||
}
|
||||
|
||||
void gui()
|
||||
{
|
||||
if(igCollapsingHeader("Systems", ImGuiTreeNodeFlags_Framed))
|
||||
{
|
||||
bool true_ = true;
|
||||
igIndent(8);
|
||||
foreach(ref SystemGUI system;systems)
|
||||
{
|
||||
if(igCheckbox(system.name,&system.enabled))
|
||||
{
|
||||
if(system.enabled)system.system.enable();
|
||||
else system.system.disable();
|
||||
}
|
||||
}
|
||||
igUnindent(8);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
demos/source/gui/system.d
Normal file
11
demos/source/gui/system.d
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
module gui.system;
|
||||
|
||||
import ecs.system;
|
||||
|
||||
struct SystemGUI
|
||||
{
|
||||
const (char)* name;
|
||||
System* system;
|
||||
|
||||
bool enabled = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue