Make app::scene_application call scene->on_exit when stopped
This commit is contained in:
parent
9b9af9e3bc
commit
d48f9c086f
2 changed files with 9 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ namespace psemek::app
|
|||
void on_event(touch_event const &) override;
|
||||
void on_event(key_event const &) override;
|
||||
|
||||
void stop() override;
|
||||
|
||||
void update() override;
|
||||
void present() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,13 @@ namespace psemek::app
|
|||
on_event_impl(event);
|
||||
}
|
||||
|
||||
void scene_application::stop()
|
||||
{
|
||||
if (auto scene = current_scene())
|
||||
scene->on_exit();
|
||||
application_base::stop();
|
||||
}
|
||||
|
||||
void scene_application::update()
|
||||
{
|
||||
if (auto scene = current_scene())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue