summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--draw/anim.cpp2
-rw-r--r--editor/app.hpp2
-rw-r--r--editor/draw.cpp1
-rw-r--r--editor/imgui.cpp2
-rw-r--r--main/clickable.hpp2
5 files changed, 5 insertions, 4 deletions
diff --git a/draw/anim.cpp b/draw/anim.cpp
index 1c333ca1..ff0914c8 100644
--- a/draw/anim.cpp
+++ b/draw/anim.cpp
@@ -38,7 +38,7 @@ void anim_mesh::add_clickable(tile_shader& shader, const Vector2i& win_size, con
{
clickable item = {
{ f.offset, f.offset + f.size }, { offset, offset + Vector2i(f.size) },
- a.bitmask(), s, s->ordinal(),
+ a.bitmask(), &*s, s->ordinal(),
a.info().pixel_size[0],
!g.mirror_from.isEmpty(),
};
diff --git a/editor/app.hpp b/editor/app.hpp
index 4223f8c9..c9bfa966 100644
--- a/editor/app.hpp
+++ b/editor/app.hpp
@@ -45,7 +45,7 @@ enum class popup_target_type : unsigned char {
};
struct popup_target final {
- std::shared_ptr<entity> e;
+ entity* e;
popup_target_type target = popup_target_type::none;
bool operator==(const popup_target&) const;
};
diff --git a/editor/draw.cpp b/editor/draw.cpp
index ab9cb7ee..6d07f871 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -146,7 +146,6 @@ void app::draw_collision_boxes()
void app::draw()
{
- //draw_character();
if (_render_bboxes)
draw_collision_boxes();
if (_editor.current_tile_editor() || _editor.current_scenery_editor())
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index 7fafc8d7..9a83d780 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -178,7 +178,9 @@ void app::kill_popups(bool hard)
{
const bool imgui = _imgui.context() != nullptr;
+ _pending_popup = false;
_popup_target = {};
+
if (imgui)
ImGui::CloseCurrentPopup();
diff --git a/main/clickable.hpp b/main/clickable.hpp
index 38968d87..0b491a52 100644
--- a/main/clickable.hpp
+++ b/main/clickable.hpp
@@ -12,7 +12,7 @@ struct clickable final {
Math::Range2D<unsigned> src;
Math::Range2D<int> dest;
BitArrayView bitmask;
- std::shared_ptr<entity> e;
+ entity* e;
float depth;
uint32_t stride;
bool mirrored;