summaryrefslogtreecommitdiffhomepage
path: root/editor/imgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/imgui.cpp')
-rw-r--r--editor/imgui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index 2923c3ea..e25edb1f 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -107,7 +107,7 @@ float app::draw_main_menu()
do_key(key_render_all_z_levels);
}
- main_menu_height = ImGui::GetContentRegionMax().y;
+ main_menu_height = ImGui::GetContentRegionAvail().y;
}
return main_menu_height;
}
@@ -312,7 +312,7 @@ void app::draw_lightmap_test(float main_menu_height)
if (ImGui::Begin("Lightmap", &is_open, flags))
{
- ImGui::Image(&shader.accum_texture(), preview_size, {0, 0}, {1, 1});
+ ImGui::Image(shader.accum_texture().id(), preview_size, {0, 0}, {1, 1});
ImGui::End();
}
else
@@ -338,7 +338,7 @@ void app::do_popup_menu()
{
const auto [id, target] = _popup_target;
auto& w = M->world();
- const auto eʹ = w.find_object(id);
+ auto eʹ = w.find_object(id);
if (target == popup_target_type::none || !eʹ)
{
@@ -372,7 +372,7 @@ void app::do_popup_menu()
if (!exists)
add_inspector(std::exchange(_popup_target, {}));
{
- char buf2[10], buf3[128], buf[sizeof buf2 + sizeof buf3 - 1];
+ char buf2[10], buf3[128], buf[sizeof buf2 + sizeof buf3 + 3 - 1];
entity_inspector_name(buf2, e.id);
entity_friendly_name(buf3, sizeof buf3, e);
std::snprintf(buf, sizeof buf, "%s###%s", buf3, buf2);
@@ -393,7 +393,7 @@ void app::do_popup_menu()
e.destroy_script_pre(eʹ, script_destroy_reason::kill);
e.chunk().remove_object(e.index());
e.destroy_script_post();
- e.gone = true;
+ eʹ.destroy();
}
}
else