summaryrefslogtreecommitdiffhomepage
path: root/main/floormat-events.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-23 19:13:21 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-23 19:13:21 +0200
commitfe5cdbe0fa48e14154be89e89e041a02f842d3b1 (patch)
tree633e086fc67bcffb7f7f63c3d284ec2097d76f34 /main/floormat-events.cpp
parented0b81dcbdd718e55a9d09b6da54950c664be9c3 (diff)
a
Diffstat (limited to 'main/floormat-events.cpp')
-rw-r--r--main/floormat-events.cpp15
1 files changed, 6 insertions, 9 deletions
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 <SDL_events.h>
#include <SDL_video.h>
@@ -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)