summaryrefslogtreecommitdiffhomepage
path: root/main/editor.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-21 17:45:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-21 17:45:52 +0200
commita4847d340b8a90cc538247280de281ca24790c82 (patch)
tree32dff96f70a6b786642068406e6259e93199fc34 /main/editor.hpp
parente33941d79bb2ab6ac328b0ed142bc0360f8fe694 (diff)
more gui work
Diffstat (limited to 'main/editor.hpp')
-rw-r--r--main/editor.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/editor.hpp b/main/editor.hpp
index c96c0b2f..34a6671c 100644
--- a/main/editor.hpp
+++ b/main/editor.hpp
@@ -35,8 +35,8 @@ struct tile_type final
void clear_selection();
void select_tile(const std::shared_ptr<tile_atlas>& atlas, std::uint8_t variant);
void select_tile_permutation(const std::shared_ptr<tile_atlas>& atlas);
- bool is_tile_selected(const std::shared_ptr<tile_atlas>& atlas, std::uint8_t variant);
- bool is_permutation_selected(const std::shared_ptr<tile_atlas>& atlas);
+ bool is_tile_selected(const std::shared_ptr<tile_atlas>& atlas, std::uint8_t variant) const;
+ bool is_permutation_selected(const std::shared_ptr<tile_atlas>& atlas) const;
std::optional<std::tuple<std::shared_ptr<tile_atlas>, std::uint8_t>> get_selected();
void place_tile(world& world, global_coords pos, const std::tuple<std::shared_ptr<tile_atlas>, std::uint8_t>& img);
@@ -70,6 +70,9 @@ struct editor final
tile_type& floor() { return _floor; }
const tile_type& floor() const { return _floor; }
+ tile_type* current();
+ const tile_type* current() const;
+
void on_click(world& world, global_coords pos);
void on_mouse_move(world& world, const global_coords pos);
void on_release();