diff options
| author | ilotterytea <iltsu@alright.party> | 2025-02-02 03:59:39 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-02-02 03:59:39 +0500 |
| commit | 5f8caec1e2762568e8e3845f13e980dce8cf13f1 (patch) | |
| tree | 667469539cca73c99362611075d7020b1d2b6e99 /src/editor.cpp | |
| parent | d8d3cfb04e7801ca726fead4eeb34365b4e20082 (diff) | |
feat: show what level and floor is selected
Diffstat (limited to 'src/editor.cpp')
| -rw-r--r-- | src/editor.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/editor.cpp b/src/editor.cpp index 3b36285..d59cd64 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -254,6 +254,21 @@ namespace silly::editor { } } + ImGui::SameLine(ImGui::GetContentRegionAvail().x - 200); + + // Current level and floor info + if (!pkg.get_levels().empty() && + !pkg.get_current_level().get_floors().empty()) { + TileLevel &level = this->package.get_current_level(); + TileFloor &floor = level.get_current_floor(); + + ImGui::Text("Level %s%d | Floor %s%d | Tiles: %d", + (this->package.get_current_level_index() < 10 ? "0" : ""), + this->package.get_current_level_index(), + (level.get_current_floor_index() < 10 ? "0" : ""), + level.get_current_floor_index(), floor.get_tile_count()); + } + ImGui::EndMainMenuBar(); } } |
