Release now return name and entity of the entity that was previously klicked.

This commit is contained in:
Tleety
2016-02-19 13:16:26 +01:00
parent fc5d054cb2
commit 6e5335a266
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -7,6 +7,7 @@ namespace Events
{
struct ButtonReleased : public Event {
std::string EntityName;
EntityWrapper Entity;
};
+2 -1
View File
@@ -56,7 +56,8 @@ bool ButtonSystem::OnMouseRelease(const Events::MouseRelease& e)
EntityWrapper ent = EntityWrapper(m_World, m_PickData.Entity);
Events::ButtonReleased eReleased;
eReleased.Entity = ent;
eReleased.EntityName = m_PickEntity.Name();
eReleased.Entity = m_PickEntity;
m_EventBroker->Publish(eReleased);
if(m_World->HasComponent(m_PickData.Entity, "Button")) {