HACK: Added Activate button for spawners in editor. Right now it includes the event from Game, but SpawnerSystem should probably be moved to Engine.

This commit is contained in:
2016-03-01 16:35:30 +01:00
parent e4c6a19c38
commit b2eee10602
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@
#include "../Core/ELockMouse.h"
#include "../Core/EFileDropped.h"
#include "../Rendering/Texture.h"
#include "Game/Events/ESpawnerSpawn.h"
class EditorGUI
{
+9
View File
@@ -338,6 +338,15 @@ bool EditorGUI::drawComponentNode(EntityWrapper entity, const ComponentInfo& ci)
}
}
if (ci.Name == "Spawner") {
if (ImGui::Button("Activate")) {
Events::SpawnerSpawn e;
e.Spawner = entity;
e.Parent = entity;
m_EventBroker->Publish(e);
}
}
return true;
}