-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
49 lines
No EOL
1,019 B
D
49 lines
No EOL
1,019 B
D
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);
|
|
}
|
|
|
|
}
|
|
} |