Update StatisticsWindow to use locale-independent ids

This commit is contained in:
Liza 2023-02-11 14:17:26 +01:00
parent 3cd75ff9a5
commit c7b8e69732

View File

@ -34,16 +34,16 @@ namespace Pal.Client.Windows
{ {
if (ImGui.BeginTabBar("Tabs")) if (ImGui.BeginTabBar("Tabs"))
{ {
DrawDungeonStats(Localization.PalaceOfTheDead, ETerritoryType.Palace_1_10, ETerritoryType.Palace_191_200); DrawDungeonStats("Palace of the Dead", Localization.PalaceOfTheDead, ETerritoryType.Palace_1_10, ETerritoryType.Palace_191_200);
DrawDungeonStats(Localization.HeavenOnHigh, ETerritoryType.HeavenOnHigh_1_10, ETerritoryType.HeavenOnHigh_91_100); DrawDungeonStats("Heaven on High", Localization.HeavenOnHigh, ETerritoryType.HeavenOnHigh_1_10, ETerritoryType.HeavenOnHigh_91_100);
} }
} }
private void DrawDungeonStats(string name, ETerritoryType minTerritory, ETerritoryType maxTerritory) private void DrawDungeonStats(string id, string name, ETerritoryType minTerritory, ETerritoryType maxTerritory)
{ {
if (ImGui.BeginTabItem(name)) if (ImGui.BeginTabItem($"{name}###{id}"))
{ {
if (ImGui.BeginTable($"TrapHoardStatistics{name}", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.Resizable)) if (ImGui.BeginTable($"TrapHoardStatistics{id}", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.Resizable))
{ {
ImGui.TableSetupColumn(Localization.Statistics_TerritoryId); ImGui.TableSetupColumn(Localization.Statistics_TerritoryId);
ImGui.TableSetupColumn(Localization.Statistics_InstanceName); ImGui.TableSetupColumn(Localization.Statistics_InstanceName);