summaryrefslogtreecommitdiff
path: root/src/editor.hpp
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-02-02 02:54:34 +0500
committerilotterytea <iltsu@alright.party>2025-02-02 02:54:34 +0500
commite7536175164e8ba816041971d9f2ab88082b0a6f (patch)
tree3a4baa1fdb2c6b6a593e15f79926c354acac5211 /src/editor.hpp
parent0ae2d10bdfd3d4fe7483829fb9c9257973e644c7 (diff)
feat: windows for creating a new level and floor
Diffstat (limited to 'src/editor.hpp')
-rw-r--r--src/editor.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/editor.hpp b/src/editor.hpp
index 1e055e6..0851e5c 100644
--- a/src/editor.hpp
+++ b/src/editor.hpp
@@ -18,6 +18,14 @@ namespace silly::editor {
TilesetTileType type;
};
+ struct NewLevelState {
+ std::string name;
+ };
+
+ struct NewFloorState {
+ int width = 10, height = 10;
+ };
+
class Editor {
public:
Editor(LevelPackage &package) : package(package) {}
@@ -28,6 +36,9 @@ namespace silly::editor {
const float get_zoom() const;
private:
+ void createNewLevel(const sf::RenderWindow &window);
+ void createNewFloor(const sf::RenderWindow &window);
+
LevelPackage &package;
float rotation;
@@ -38,5 +49,7 @@ namespace silly::editor {
std::optional<std::shared_ptr<TilesetTile>> selectedTile;
std::optional<NewTileState> newTileState;
+ std::optional<NewLevelState> newLevelState;
+ std::optional<NewFloorState> newFloorState;
};
} \ No newline at end of file