mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
ChillerDragon
3c5320aa90
This matches the naming convention used for client components and the `GameServer()->OnInit()`
25 lines
467 B
C++
25 lines
467 B
C++
#include "component.h"
|
|
|
|
bool CEditorComponent::OnInput(const IInput::CEvent &Event)
|
|
{
|
|
for(CEditorComponent &Component : m_vSubComponents)
|
|
{
|
|
if(Component.OnInput(Event))
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void CEditorComponent::InitSubComponents()
|
|
{
|
|
for(CEditorComponent &Component : m_vSubComponents)
|
|
{
|
|
Component.OnInit(Editor());
|
|
}
|
|
}
|
|
|
|
void CEditorComponent::RegisterSubComponent(CEditorComponent &Component)
|
|
{
|
|
m_vSubComponents.emplace_back(Component);
|
|
}
|