diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-21 18:31:06 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-21 18:31:06 +0100 |
commit | dba52df4581329a692d889d76cb7f093e7e3f7d9 (patch) | |
tree | 85d1979fc3062856ac2f4eaaae484a1d22bfc4f5 /editor/wall-editor.hpp | |
parent | 38993b7085d42087ce5810ea0992108b25588786 (diff) |
www
Diffstat (limited to 'editor/wall-editor.hpp')
-rw-r--r-- | editor/wall-editor.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/editor/wall-editor.hpp b/editor/wall-editor.hpp index b23cab60..bba395ad 100644 --- a/editor/wall-editor.hpp +++ b/editor/wall-editor.hpp @@ -2,6 +2,7 @@ #include "editor-enums.hpp" #include "src/rotation.hpp" #include "src/global-coords.hpp" +#include "loader/wall-info.hpp" #include <memory> #include <map> @@ -12,13 +13,18 @@ class wall_atlas; class wall_editor { - std::map<StringView, std::shared_ptr<wall_atlas>> _atlases; + std::map<StringView, wall_info> _atlases; std::shared_ptr<wall_atlas> _selected_atlas; rotation _r = rotation::N; void load_atlases(); public: + auto cbegin() const noexcept { return _atlases.cbegin(); } + auto cend() const noexcept { return _atlases.cend(); } + auto begin() const noexcept { return _atlases.cbegin(); } + auto end() const noexcept { return _atlases.cend(); } + wall_editor(); StringView name() const; @@ -26,7 +32,7 @@ public: void set_rotation(enum rotation r); void toggle_rotation(); - const wall_atlas* get_selected() const; + std::shared_ptr<wall_atlas> get_selected() const; void select_atlas(const std::shared_ptr<wall_atlas>& atlas); void clear_selection(); bool is_atlas_selected(const std::shared_ptr<wall_atlas>& atlas) const; |