From 8b7af89b78cacf2e171e2b73fc508704ea79c316 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 25 Dec 2022 00:29:43 +0100 Subject: main, editor: set cursor from imgui --- main/main-impl.cpp | 2 ++ main/main-impl.hpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'main') 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(*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> clickable_scenery() const noexcept override; ArrayView> 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; -- cgit v1.2.3