diff options
| author | ilotterytea <iltsu@alright.party> | 2025-02-02 15:08:42 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-02-02 15:08:57 +0500 |
| commit | bc9d1725c5cca89f43c8e314e6bb8088f75acf27 (patch) | |
| tree | 26acb17b7232bd2fb7d065299b2c2e0927247eeb /src/editor.cpp | |
| parent | 34f081520c754cc20c2ec929be7798fe3f3806e1 (diff) | |
feat: a base class for sets
Diffstat (limited to 'src/editor.cpp')
| -rw-r--r-- | src/editor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/editor.cpp b/src/editor.cpp index 74326bf..c97f375 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -19,7 +19,7 @@ #include "nfd.h" #include "nfd.hpp" #include "package.hpp" -#include "tileset.hpp" +#include "sets/tileset.hpp" namespace silly::editor { void Editor::update(const sf::Event &event, sf::RenderWindow &window) { @@ -331,8 +331,8 @@ namespace silly::editor { int columns = ImGui::GetContentRegionAvail().x / (imageSize + padding); int count = 0; - for (auto it = this->package.get_tileset().get_tiles().begin(); - it != this->package.get_tileset().get_tiles().end(); ++it) { + for (auto it = this->package.get_tileset().get_entries().begin(); + it != this->package.get_tileset().get_entries().end(); ++it) { if (ImGui::ImageButton(std::to_string(it->get()->id).c_str(), it->get()->texture, sf::Vector2f(imageSize, imageSize))) { @@ -414,7 +414,7 @@ namespace silly::editor { // -- Tile creation -- if (ImGui::Button("Create a new tile")) { - this->package.get_tileset().add_tile(state.path, state.type); + this->package.get_tileset().add_entry(state.path, state.type); ImGui::SetWindowCollapsed(true); } |
