diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/editor.cpp | 18 |
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, |
