summaryrefslogtreecommitdiffhomepage
path: root/editor/scenery-editor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/scenery-editor.hpp')
-rw-r--r--editor/scenery-editor.hpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/editor/scenery-editor.hpp b/editor/scenery-editor.hpp
index b461fd0c..521353fa 100644
--- a/editor/scenery-editor.hpp
+++ b/editor/scenery-editor.hpp
@@ -2,7 +2,7 @@
#include "src/scenery.hpp"
#include <map>
#include <memory>
-#include <Corrade/Containers/StringView.h>
+#include <Corrade/Containers/String.h>
namespace floormat {
@@ -10,7 +10,10 @@ struct anim_atlas;
struct scenery_editor final
{
- using frame_t = scenery::frame_t;
+ struct scenery_ {
+ String name, descr;
+ scenery_proto proto;
+ };
scenery_editor() noexcept;
@@ -19,17 +22,17 @@ struct scenery_editor final
void next_rotation();
void prev_rotation();
- void select_tile(const scenery_proto& proto);
+ void select_tile(const scenery_& s);
void clear_selection();
- const scenery_proto& get_selected();
+ const scenery_& get_selected();
bool is_atlas_selected(const std::shared_ptr<anim_atlas>& atlas) const;
- bool is_item_selected(const scenery_proto& proto) const;
+ bool is_item_selected(const scenery_& s) const;
private:
void load_atlases();
- std::map<StringView, std::shared_ptr<anim_atlas>> _atlases;
- scenery_proto _selected;
+ std::map<String, scenery_> _atlases;
+ scenery_ _selected;
};
} // namespace floormat