diff options
| author | ilotterytea <iltsu@alright.party> | 2025-02-01 17:14:45 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-02-01 17:14:45 +0500 |
| commit | fcb69fd43a029db9f230f701a51338a9fe2ea60b (patch) | |
| tree | 6ef1f580d380b3daa0fb91fdefb010a3217c98bf /src/main.cpp | |
| parent | 0c7c29d669c16c3821b19d00a9319f3eba5cf05d (diff) | |
feat: ability to place and remove tiles
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3eb444c..0a3432b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,7 +17,7 @@ int main() { window.setFramerateLimit(60); ImGui::SFML::Init(window); - silly::editor::Floor floor(30, 30); + silly::editor::TileFloor tileFloor(30, 30); sf::Clock deltaClock; while (window.isOpen()) { @@ -44,13 +44,17 @@ int main() { } } + tileFloor.update(window); + ImGui::SFML::Update(window, deltaClock.restart()); window.clear(); + tileFloor.render(window); + // rendering grid - for (int x = 0; x < floor.get_width(); x++) { - for (int y = 0; y < floor.get_height(); y++) { + for (int x = 0; x < tileFloor.get_width(); x++) { + for (int y = 0; y < tileFloor.get_height(); y++) { sf::RectangleShape shape({size, size}); shape.setFillColor(sf::Color::Transparent); shape.setOutlineColor(sf::Color(80, 80, 80)); |
