mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
feat(editor): tile count button in ADT load dialog
"Count" button next to "Find Tile" scans all 64x64 tile coordinates and shows how many ADT tiles exist for the selected map. Helps users understand the scope of a map before loading individual tiles.
This commit is contained in:
parent
cc7ec8e497
commit
92787901d8
1 changed files with 15 additions and 0 deletions
|
|
@ -802,6 +802,21 @@ void EditorUI::renderLoadDialog(EditorApp& app) {
|
|||
if (!found) app.showToast("No ADT tiles found for this map");
|
||||
}
|
||||
if (ImGui::IsItemHovered()) ImGui::SetTooltip("Auto-find first available tile");
|
||||
|
||||
// Count total tiles for this map
|
||||
ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Count")) {
|
||||
int total = 0;
|
||||
for (int x = 0; x < 64; x++) {
|
||||
for (int y = 0; y < 64; y++) {
|
||||
std::string tp = "world\\maps\\" + mapLower + "\\" + mapLower + "_" +
|
||||
std::to_string(x) + "_" + std::to_string(y) + ".adt";
|
||||
if (app.getAssetManager()->getManifest().hasEntry(tp)) total++;
|
||||
}
|
||||
}
|
||||
app.showToast(mapLower + ": " + std::to_string(total) + " tiles");
|
||||
}
|
||||
if (ImGui::IsItemHovered()) ImGui::SetTooltip("Count total ADT tiles for this map");
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue