From fe5cdbe0fa48e14154be89e89e041a02f842d3b1 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 23 Oct 2022 19:13:21 +0200 Subject: a --- main/floormat-events.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'main/floormat-events.cpp') diff --git a/main/floormat-events.cpp b/main/floormat-events.cpp index 55fb7a91..8d5fa61a 100644 --- a/main/floormat-events.cpp +++ b/main/floormat-events.cpp @@ -1,5 +1,7 @@ #pragma once -#include "floormat-main.hpp" +#include "floormat-main-impl.hpp" +#include "floormat-app.hpp" +#include "floormat-events.hpp" #include "compat/assert.hpp" #include #include @@ -10,19 +12,14 @@ void main_impl::viewportEvent(Platform::Sdl2Application::ViewportEvent& event) { fm_assert(event.framebufferSize() == event.windowSize()); recalc_viewport(event.windowSize()); - app.viewport_event(event.windowSize()); + app.on_viewport_event(event.windowSize()); } void main_impl::mousePressEvent(Platform::Sdl2Application::MouseEvent& event) { - if (app.) - if (_imgui.handleMousePressEvent(event)) + event. + if (app.on_mouse_down()) return event.setAccepted(); - else if (_cursor_tile) - { - const auto& tile = *_cursor_tile; - do_mouse_click(tile, (int)event.button()); - } } void main_impl::mouseReleaseEvent(Platform::Sdl2Application::MouseEvent& event) -- cgit v1.2.3