Prepare stat window for 6.35

rendering
Liza 2022-11-30 11:39:40 +01:00
parent d0eb5f0e69
commit 3c7b392475
1 changed files with 10 additions and 3 deletions

View File

@ -30,9 +30,16 @@ namespace Pal.Client.Windows
public override void Draw()
{
if (ImGui.CollapsingHeader("Discovered Traps & Coffers per Instance", ImGuiTreeNodeFlags.DefaultOpen))
DrawDungeonStats("Palace of the Dead", ETerritoryType.Palace_1_10, ETerritoryType.Palace_191_200);
DrawDungeonStats("Heaven on High", ETerritoryType.HeavenOnHigh_1_10, ETerritoryType.HeavenOnHigh_91_100);
}
private void DrawDungeonStats(string name, ETerritoryType minTerritory, ETerritoryType maxTerritory)
{
if (ImGui.BeginTable("TrapHoardStatistics", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.Resizable))
if (ImGui.CollapsingHeader(name, ImGuiTreeNodeFlags.DefaultOpen))
{
if (ImGui.BeginTable($"TrapHoardStatistics{name}", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.Resizable))
{
ImGui.TableSetupColumn("Id");
ImGui.TableSetupColumn("Instance");
@ -40,7 +47,7 @@ namespace Pal.Client.Windows
ImGui.TableSetupColumn("Hoard");
ImGui.TableHeadersRow();
foreach (var (territoryType, stats) in _territoryStatistics)
foreach (var (territoryType, stats) in _territoryStatistics.Where(x => x.Key >= minTerritory && x.Key <= maxTerritory))
{
ImGui.TableNextRow();
if (ImGui.TableNextColumn())