summaryrefslogtreecommitdiff
path: root/src/editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.cpp')
-rw-r--r--src/editor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/editor.cpp b/src/editor.cpp
index 65e9cf4..4b8396d 100644
--- a/src/editor.cpp
+++ b/src/editor.cpp
@@ -52,6 +52,24 @@ namespace silly::editor {
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
+ // --- SELECTED TILE ---
+ if (this->selectedTile.has_value()) {
+ TilesetTile *t = this->selectedTile->get();
+
+ if (t->id == TILE_FLOOR) {
+ ImGui::Text("FLOOR");
+ } else if (t->id == TILE_WALL) {
+ ImGui::Text("WALL");
+ } else {
+ ImGui::Text("UNKNOWN");
+ }
+
+ ImGui::Image(t->texture, sf::Vector2f(64, 64));
+ } else {
+ ImGui::Text("NO TILE SELECTED!");
+ ImGui::Dummy(ImVec2(64, 64));
+ }
+
// --- TILE SELECTION ---
ImGui::BeginChild("TileSelectionRegion", ImVec2(0, 400),
ImGuiChildFlags_Border,