ddnet/src/game/editor/component.cpp

25 lines
467 B
C++
Raw Normal View History

#include "component.h"
bool CEditorComponent::OnInput(const IInput::CEvent &Event)
{
for(CEditorComponent &Component : m_vSubComponents)
{
if(Component.OnInput(Event))
return true;
}
return false;
2023-08-14 08:12:06 +00:00
}
void CEditorComponent::InitSubComponents()
{
for(CEditorComponent &Component : m_vSubComponents)
{
Component.OnInit(Editor());
}
}
void CEditorComponent::RegisterSubComponent(CEditorComponent &Component)
{
m_vSubComponents.emplace_back(Component);
}