diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 13:25:30 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 13:25:45 +0100 |
commit | 1524db15d4e89ad2e7462710c9b1de388fce6ba1 (patch) | |
tree | d151c58e4c9fe1f1c8d0c3acd6e59b6d36a77a0b /editor/imgui.cpp | |
parent | d2eae22f0661703507dcbb1407788743827a2862 (diff) |
editor: move imgui-inspect to its own file
Diffstat (limited to 'editor/imgui.cpp')
-rw-r--r-- | editor/imgui.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 38bae066..1accd9e5 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -2,10 +2,6 @@ #include "floormat/main.hpp" #include "compat/format.hpp" #include "imgui-raii.hpp" -#include "world.hpp" -#include "scenery.hpp" -#include "inspect.hpp" -#include "main/clickable.hpp" #include <Magnum/Math/Color.h> namespace floormat { @@ -150,29 +146,6 @@ void app::draw_tile_under_cursor() {window_size[0]*.5f - size.x/2, 3*dpi[1]}, (unsigned)-1, buf); } -void app::draw_inspector() -{ - auto b = push_id("inspector"); - auto& w = M->world(); - if (cursor.pixel) - if (const auto* sc = find_clickable_scenery(cursor.pixel)) - inspected_scenery = {InPlaceInit, sc->chunk, sc->pos}; - if (inspected_scenery) - { - auto [c, t] = w[*inspected_scenery]; - if (auto s = t.scenery()) - { - char buf[32]; std::snprintf(buf, sizeof buf, "i_0x%p", (void*)&s); - auto b = push_id(buf); - auto dpi = M->dpi_scale(); - ImGui::SetNextWindowSize({300*dpi[0], 0}); - auto b2 = begin_window("inspector"_s); - if (entities::inspect_type(s)) - c.mark_scenery_modified(); - } - } -} - void app::draw_editor_pane(float main_menu_height) { auto* ed = _editor.current_tile_editor(); |