psemek/libs/app/source/scene_application.cpp
lisyarus 28126518d5
All checks were successful
Run tests / Run tests (push) Successful in 7m6s
Add shown/hidden and minimized/maximized/restored window events
2026-08-19 23:18:11 +03:00

93 lines
1.7 KiB
C++

#include <psemek/app/scene_application.hpp>
namespace psemek::app
{
void scene_application::on_event(resize_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(focus_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(show_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(minimize_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(mouse_move_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(mouse_wheel_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(mouse_button_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(touch_down_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(touch_up_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(touch_move_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(key_event const & event)
{
on_event_impl(event);
}
void scene_application::on_event(text_input_event const & event)
{
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())
scene->update();
}
void scene_application::present()
{
if (auto scene = current_scene())
scene->present();
}
template <typename Event>
void scene_application::on_event_impl(Event const & event)
{
application_base::on_event(event);
if (auto scene = current_scene())
scene->on_event(event);
}
}