From 721ce1bbb6f04f380343766d87ffdd9d4407b577 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 8 Apr 2023 09:08:55 +0200 Subject: a --- editor/app.cpp | 2 ++ editor/imgui-misc.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/app.cpp b/editor/app.cpp index 93fca78b..6186beb7 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -87,12 +87,14 @@ void app::reset_world(struct world&& w_) kill_popups(true); clear_keys(); + const auto pixel = cursor.pixel; cursor = {}; _character_id = 0; auto& w = M->reset_world(std::move(w_)); w.collect(true); ensure_player_character(w); + update_cursor_tile(pixel); } int app::exec() diff --git a/editor/imgui-misc.cpp b/editor/imgui-misc.cpp index 9acd906e..84522f57 100644 --- a/editor/imgui-misc.cpp +++ b/editor/imgui-misc.cpp @@ -63,7 +63,7 @@ void app::draw_z_level() const auto font_size = ImGui::GetCurrentContext()->FontSize+3; auto shadow_offset = Vector2(1, 1)/* * dpi */; auto px = Vector2(*cursor.pixel) + offset, px2 = px + shadow_offset; - draw.AddText(nullptr, font_size, {px2[0], px2[1]}, ImGui::ColorConvertFloat4ToU32({0, 0, 0, 1}), buf); + draw.AddText(nullptr, font_size, {px2[0], px2[1]}, ImGui::ColorConvertFloat4ToU32({0, 0, 0, .75f}), buf); draw.AddText(nullptr, font_size, {px[0], px[1]}, ImGui::ColorConvertFloat4ToU32({1, 0, 1, 1}), buf); } } -- cgit v1.2.3