Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
comparison FrmMainWindow.cs @ 135:fda46380dd68
Re #329: "Points" system should be used in UI
* Replace fixed "pts" or "pt" with game system's text
(May be fixed, but needs more testing)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 09 Oct 2011 21:03:09 +0100 |
parents | 42d2aa87dfa7 |
children | 33962c2ef550 |
comparison
equal
deleted
inserted
replaced
134:7e77e79e5fdd | 135:fda46380dd68 |
---|---|
251 ArmyCategory c = (ArmyCategory)o; | 251 ArmyCategory c = (ArmyCategory)o; |
252 string name = ""; | 252 string name = ""; |
253 | 253 |
254 if (!Preferences.GetBooleanProperty("ShowCatPercentage")) | 254 if (!Preferences.GetBooleanProperty("ShowCatPercentage")) |
255 { | 255 { |
256 name = Translation.GetTranslation("categoryTreeCatName", "{0} - {1}pts", c.Name, c.Points); | 256 name = Translation.GetTranslation("categoryTreeCatName", "{0} - {1}{2}", c.Name, c.Points, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(c.Points)); |
257 } | 257 } |
258 else | 258 else |
259 { | 259 { |
260 name = Translation.GetTranslation("categoryTreeCatNamePercentage", "{0} - {1}pts ({2}%)", c.Name, c.Points, (c.ParentArmy.Points > 0 ? Math.Round((c.Points / c.ParentArmy.Points) * 100) : 0)); | 260 name = Translation.GetTranslation("categoryTreeCatNamePercentage", "{0} - {1}{3} ({2}%)", c.Name, c.Points, (c.ParentArmy.Points > 0 ? Math.Round((c.Points / c.ParentArmy.Points) * 100) : 0), WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(c.Points)); |
261 } | 261 } |
262 | 262 |
263 (cell as CellRendererText).Text = name; | 263 (cell as CellRendererText).Text = name; |
264 } | 264 } |
265 else | 265 else |
266 { | 266 { |
267 if (o is WFObjects.Unit) | 267 if (o is WFObjects.Unit) |
268 { | 268 { |
269 WFObjects.Unit u = (WFObjects.Unit)o; | 269 WFObjects.Unit u = (WFObjects.Unit)o; |
270 string name = Translation.GetTranslation("unitTreeCatName", "{0} - {1}pts", u.Name, u.Points); | 270 string name = Translation.GetTranslation("unitTreeCatName", "{0} - {1}{2}", u.Name, u.Points, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(u.Points)); |
271 (cell as CellRendererText).Text = name; | 271 (cell as CellRendererText).Text = name; |
272 } | 272 } |
273 | 273 |
274 } | 274 } |
275 } | 275 } |
644 | 644 |
645 private void SetPointsPanelText() | 645 private void SetPointsPanelText() |
646 { | 646 { |
647 if (WarFoundryCore.CurrentArmy != null) | 647 if (WarFoundryCore.CurrentArmy != null) |
648 { | 648 { |
649 lblTotalPoints.Text = Translation.GetTranslation("statusPanelPoints", "{0}pts of {1} pts", WarFoundryCore.CurrentArmy.Points, WarFoundryCore.CurrentArmy.MaxPoints); | 649 lblTotalPoints.Text = Translation.GetTranslation("statusPanelPoints", "{0}{2} of {1}{3}", WarFoundryCore.CurrentArmy.Points, WarFoundryCore.CurrentArmy.MaxPoints, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(WarFoundryCore.CurrentArmy.Points), WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(WarFoundryCore.CurrentArmy.MaxPoints)); |
650 } | 650 } |
651 else | 651 else |
652 { | 652 { |
653 lblTotalPoints.Text = ""; | 653 lblTotalPoints.Text = ""; |
654 } | 654 } |