add on attach for emit signal
This commit is contained in:
@@ -34,9 +34,4 @@ namespace VE
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void application::attach_layers()
|
||||
{
|
||||
for (auto l : m_layers_stack) l->on_attach();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,12 @@ namespace VE
|
||||
void push_layer(Args*... args)
|
||||
{
|
||||
(m_layers_stack.push_back(args), ...);
|
||||
attach_layers();
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
void on_attach(Args*... args)
|
||||
{
|
||||
(args->on_attach(), ...);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user