Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
changeset 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 | 7e77e79e5fdd |
children | 560eb34acd17 |
files | FrmMainWindow.cs Widgets/UnitDisplayWidget.cs gtk-gui/objects.xml translations/en.translation |
diffstat | 4 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmMainWindow.cs Sun Oct 09 20:37:53 2011 +0100 +++ b/FrmMainWindow.cs Sun Oct 09 21:03:09 2011 +0100 @@ -253,11 +253,11 @@ if (!Preferences.GetBooleanProperty("ShowCatPercentage")) { - name = Translation.GetTranslation("categoryTreeCatName", "{0} - {1}pts", c.Name, c.Points); + name = Translation.GetTranslation("categoryTreeCatName", "{0} - {1}{2}", c.Name, c.Points, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(c.Points)); } else { - 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)); + 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)); } (cell as CellRendererText).Text = name; @@ -267,7 +267,7 @@ if (o is WFObjects.Unit) { WFObjects.Unit u = (WFObjects.Unit)o; - string name = Translation.GetTranslation("unitTreeCatName", "{0} - {1}pts", u.Name, u.Points); + string name = Translation.GetTranslation("unitTreeCatName", "{0} - {1}{2}", u.Name, u.Points, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(u.Points)); (cell as CellRendererText).Text = name; } @@ -646,7 +646,7 @@ { if (WarFoundryCore.CurrentArmy != null) { - lblTotalPoints.Text = Translation.GetTranslation("statusPanelPoints", "{0}pts of {1} pts", WarFoundryCore.CurrentArmy.Points, WarFoundryCore.CurrentArmy.MaxPoints); + 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)); } else {
--- a/Widgets/UnitDisplayWidget.cs Sun Oct 09 20:37:53 2011 +0100 +++ b/Widgets/UnitDisplayWidget.cs Sun Oct 09 21:03:09 2011 +0100 @@ -229,7 +229,7 @@ } else { - translation = Translation.GetTranslation("equipmentAmountWithCost", "{0} ({1} at {2}pts each)", item.Name, GetAmountString(item), item.Cost); + translation = Translation.GetTranslation("equipmentAmountWithCost", "{0} ({1} at {2}{3} each)", item.Name, GetAmountString(item), item.Cost, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(item.Cost)); } return translation;
--- a/gtk-gui/objects.xml Sun Oct 09 20:37:53 2011 +0100 +++ b/gtk-gui/objects.xml Sun Oct 09 21:03:09 2011 +0100 @@ -7,4 +7,8 @@ </itemgroup> </signals> </object> + <object type="IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget" palette-category="WarFoundry GTK# GUI" allow-children="false" base-type="Gtk.Bin"> + <itemgroups /> + <signals /> + </object> </objects> \ No newline at end of file
--- a/translations/en.translation Sun Oct 09 20:37:53 2011 +0100 +++ b/translations/en.translation Sun Oct 09 21:03:09 2011 +0100 @@ -6,7 +6,7 @@ <translation id="bttnClose">Close</translation> <translation id="bttnCreate">Create</translation> <!-- Main Window --> -<translation id="statusPanelPoints">{0} pts / {1} pts</translation> +<translation id="statusPanelPoints">{0}{2} / {1}{3}</translation> <!-- Main Window / Menus --> <translation id="menuFile">_File</translation> <translation id="menuEdit">_Edit</translation>