diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-03 17:30:04 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-03 20:34:02 +0100 |
commit | 6d0a594e618f165eb2823bb31eb3cfe21ec1e7c5 (patch) | |
tree | 240fcbc67901c0b111efb919c049cd1749d4d0ce | |
parent | 943feead3da4439db921f310ed0994f8c9fbf0f7 (diff) |
editor, main: random crap
-rw-r--r-- | editor/draw.cpp | 5 | ||||
-rw-r--r-- | editor/imgui.cpp | 2 | ||||
-rw-r--r-- | main/debug.cpp | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp index 92f0ea47..9f113e71 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -152,11 +152,12 @@ clickable* app::find_clickable_scenery(const Optional<Vector2i>& pixel) return nullptr; clickable* item = nullptr; - float depth = -1; + float depth = -(1 << 24); const auto array = M->clickable_scenery(); + const auto p = *pixel; for (clickable& c : array) - if (c.depth > depth && c.dest.contains(*pixel)) + if (c.depth > depth && c.dest.contains(p)) { const auto pos_ = *pixel - c.dest.min() + Vector2i(c.src.min()); const auto pos = !c.mirrored ? pos_ : Vector2i(int(c.src.sizeX()) - 1 - pos_[0], pos_[1]); diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 535f028b..28337bc8 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -259,7 +259,7 @@ void app::do_popup_menu() fm_assert(type != popup_target_type::none); //if (type != popup_target_type::scenery) {...} if (sc) - ImGui::OpenPopup(SCENERY_POPUP_NAME.data(), ImGuiPopupFlags_NoOpenOverItems); + ImGui::OpenPopup(SCENERY_POPUP_NAME.data()); } if (auto b1 = begin_popup(SCENERY_POPUP_NAME)) diff --git a/main/debug.cpp b/main/debug.cpp index 3f5a7b16..2d320a3b 100644 --- a/main/debug.cpp +++ b/main/debug.cpp @@ -48,8 +48,8 @@ void main_impl::debug_callback(unsigned src, unsigned type, unsigned id, unsigne std::abort(); #endif - debug_break(); - //std::fputs("", stdout); // put breakpoint here + //debug_break(); + std::fputs("", stdout); // put breakpoint here } static void _debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Type type, UnsignedInt id, |