mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 17:13:51 +00:00
feat(editor): NPC list shows hostile/friendly/questgiver/vendor counts
Helps users see at-a-glance the makeup of their zone's creature pop without having to scroll the list looking at each entry's flags.
This commit is contained in:
parent
273c2fe10c
commit
469f046db5
1 changed files with 11 additions and 1 deletions
|
|
@ -1925,7 +1925,17 @@ void EditorUI::renderNpcPanel(EditorApp& app) {
|
|||
// ---- Spawned list ----
|
||||
if (ImGui::CollapsingHeader("Spawned Creatures", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
static char spawnFilter[128] = "";
|
||||
ImGui::Text("%zu placed (double-click to fly to)", spawner.spawnCount());
|
||||
// Count hostile / friendly / quest givers / vendors
|
||||
size_t hostile = 0, friendly = 0, qg = 0, vend = 0;
|
||||
for (const auto& s : spawner.getSpawns()) {
|
||||
if (s.hostile) hostile++; else friendly++;
|
||||
if (s.questgiver) qg++;
|
||||
if (s.vendor) vend++;
|
||||
}
|
||||
ImGui::Text("%zu placed", spawner.spawnCount());
|
||||
ImGui::TextDisabled("Hostile: %zu Friendly: %zu Q-givers: %zu Vendors: %zu",
|
||||
hostile, friendly, qg, vend);
|
||||
ImGui::TextDisabled("Double-click an entry to fly to it");
|
||||
ImGui::SetNextItemWidth(-1);
|
||||
ImGui::InputTextWithHint("##spawnfilter", "Filter by name...", spawnFilter, sizeof(spawnFilter));
|
||||
std::string filterLower(spawnFilter);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue