summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-25 00:29:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-25 00:29:43 +0100
commit8b7af89b78cacf2e171e2b73fc508704ea79c316 (patch)
treeed0914b105530c682991eee6edeb4d50d1536e09 /main
parent56b5489bdea839eb24165a86e937a29b9a42a39f (diff)
main, editor: set cursor from imgui
Diffstat (limited to 'main')
-rw-r--r--main/main-impl.cpp2
-rw-r--r--main/main-impl.hpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/main/main-impl.cpp b/main/main-impl.cpp
index 01aea1ca..ae3f8cfc 100644
--- a/main/main-impl.cpp
+++ b/main/main-impl.cpp
@@ -21,6 +21,8 @@ const tile_shader& main_impl::shader() const noexcept { return _shader; }
bool main_impl::is_text_input_active() const noexcept { return const_cast<main_impl&>(*this).isTextInputActive(); }
void main_impl::start_text_input() noexcept { startTextInput(); }
void main_impl::stop_text_input() noexcept { stopTextInput(); }
+Platform::Sdl2Application& main_impl::application() noexcept { return *this; }
+const Platform::Sdl2Application& main_impl::application() const noexcept { return *this; }
int main_impl::exec()
{
diff --git a/main/main-impl.hpp b/main/main-impl.hpp
index 9178d8a6..3e60ff68 100644
--- a/main/main-impl.hpp
+++ b/main/main-impl.hpp
@@ -44,6 +44,9 @@ struct main_impl final : Platform::Sdl2Application, floormat_main
ArrayView<const clickable<anim_atlas, scenery>> clickable_scenery() const noexcept override;
ArrayView<clickable<anim_atlas, scenery>> clickable_scenery() noexcept override;
+ Platform::Sdl2Application& application() noexcept override;
+ const Platform::Sdl2Application& application() const noexcept override;
+
[[maybe_unused]] void viewportEvent(ViewportEvent& event) override;
[[maybe_unused]] void mousePressEvent(MouseEvent& event) override;
[[maybe_unused]] void mouseReleaseEvent(MouseEvent& event) override;