add on detach
This commit is contained in:
@@ -11,6 +11,12 @@ namespace example
|
||||
hack::log()("on_attach");
|
||||
}
|
||||
|
||||
void ui_layer::on_detach()
|
||||
{
|
||||
VE::DISCONNECT(this);
|
||||
hack::log()("on_detach");
|
||||
}
|
||||
|
||||
void ui_layer::render()
|
||||
{
|
||||
ImGui::SetNextWindowPos(m_pos);
|
||||
|
||||
@@ -11,6 +11,12 @@ namespace example
|
||||
hack::log()("on_attach");
|
||||
}
|
||||
|
||||
void ui_layer_double::on_detach()
|
||||
{
|
||||
VE::DISCONNECT(this);
|
||||
hack::log()("on_detach");
|
||||
}
|
||||
|
||||
void ui_layer_double::render()
|
||||
{
|
||||
ImGui::SetNextWindowPos(ImVec2{ 10.f, 10.f });
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace VE
|
||||
|
||||
public:
|
||||
virtual void on_attach() {};
|
||||
virtual void on_detach() {};
|
||||
virtual void render() {};
|
||||
virtual void update() {};
|
||||
virtual void on_event(event e) {};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define VE_OVERIDE()\
|
||||
public:\
|
||||
void on_attach() override;\
|
||||
void on_detach() override;\
|
||||
void render() override;\
|
||||
void update() override;\
|
||||
void on_event(VE::event e) override
|
||||
|
||||
Reference in New Issue
Block a user