summaryrefslogtreecommitdiffhomepage
path: root/editor/update.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-22 18:46:52 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-22 18:46:52 +0100
commit51ebc370743b07926ce0a50232a1a65c6b6b27b5 (patch)
tree9c38ee65e32c6a760065ef33fe078847d7ea2d48 /editor/update.cpp
parenta917bb7c28b383c3c684bf75732188bfff0060bb (diff)
finally it works
Diffstat (limited to 'editor/update.cpp')
-rw-r--r--editor/update.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/editor/update.cpp b/editor/update.cpp
index 60d012d2..c68c7517 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -29,7 +29,7 @@ void app::maybe_initialize_chunk_(const chunk_coords& pos, chunk& c)
c[{K, K }].wall_west() = { _wall2, 0 };
c[{K, K+1}].wall_north() = { _wall1, 0 };
c[{K+1, K }].wall_west() = { _wall2, 0 };
- c[{K+1, K+1}].scenery() = { scenery::door, rotation::N, _door, false };
+ c[{K+3, K+1}].scenery() = { scenery::door, rotation::N, _door, false };
c.mark_modified();
}
@@ -98,10 +98,18 @@ void app::apply_commands(const key_set& keys)
do_key(k, key_modifiers[i]);
}
+using clickable_scenery = clickable<anim_atlas, scenery>;
+
+
+
void app::update(float dt)
{
apply_commands(keys);
do_camera(dt, keys, get_key_modifiers());
+ if (auto* s = find_clickable_scenery())
+ M->set_cursor(std::uint32_t(Cursor::Hand));
+ else
+ M->set_cursor(std::uint32_t(Cursor::Arrow));
clear_non_repeated_keys();
}