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 diff
     1.1 --- a/FrmMainWindow.cs	Sun Oct 09 20:37:53 2011 +0100
     1.2 +++ b/FrmMainWindow.cs	Sun Oct 09 21:03:09 2011 +0100
     1.3 @@ -253,11 +253,11 @@
     1.4  
     1.5  				if (!Preferences.GetBooleanProperty("ShowCatPercentage"))
     1.6  				{
     1.7 -					name = Translation.GetTranslation("categoryTreeCatName", "{0} - {1}pts", c.Name, c.Points);
     1.8 +					name = Translation.GetTranslation("categoryTreeCatName", "{0} - {1}{2}", c.Name, c.Points, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(c.Points));
     1.9  				}
    1.10  				else
    1.11  				{
    1.12 -					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));
    1.13 +					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));
    1.14  				}
    1.15  
    1.16  				(cell as CellRendererText).Text = name;
    1.17 @@ -267,7 +267,7 @@
    1.18  				if (o is WFObjects.Unit)
    1.19  				{
    1.20  					WFObjects.Unit u = (WFObjects.Unit)o;
    1.21 -					string name = Translation.GetTranslation("unitTreeCatName", "{0} - {1}pts", u.Name, u.Points);
    1.22 +					string name = Translation.GetTranslation("unitTreeCatName", "{0} - {1}{2}", u.Name, u.Points, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(u.Points));
    1.23  					(cell as CellRendererText).Text = name;
    1.24  				}
    1.25  
    1.26 @@ -646,7 +646,7 @@
    1.27  		{
    1.28  			if (WarFoundryCore.CurrentArmy != null)
    1.29  			{
    1.30 -				lblTotalPoints.Text = Translation.GetTranslation("statusPanelPoints", "{0}pts of {1} pts", WarFoundryCore.CurrentArmy.Points, WarFoundryCore.CurrentArmy.MaxPoints);
    1.31 +				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));
    1.32  			}
    1.33  			else
    1.34  			{
     2.1 --- a/Widgets/UnitDisplayWidget.cs	Sun Oct 09 20:37:53 2011 +0100
     2.2 +++ b/Widgets/UnitDisplayWidget.cs	Sun Oct 09 21:03:09 2011 +0100
     2.3 @@ -229,7 +229,7 @@
     2.4  			}
     2.5  			else
     2.6  			{
     2.7 -				translation = Translation.GetTranslation("equipmentAmountWithCost", "{0} ({1} at {2}pts each)", item.Name, GetAmountString(item), item.Cost);
     2.8 +				translation = Translation.GetTranslation("equipmentAmountWithCost", "{0} ({1} at {2}{3} each)", item.Name, GetAmountString(item), item.Cost, WarFoundryCore.CurrentGameSystem.GetPointsAbbrev(item.Cost));
     2.9  			}
    2.10  
    2.11  			return translation;
     3.1 --- a/gtk-gui/objects.xml	Sun Oct 09 20:37:53 2011 +0100
     3.2 +++ b/gtk-gui/objects.xml	Sun Oct 09 21:03:09 2011 +0100
     3.3 @@ -7,4 +7,8 @@
     3.4        </itemgroup>
     3.5      </signals>
     3.6    </object>
     3.7 +  <object type="IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget" palette-category="WarFoundry GTK# GUI" allow-children="false" base-type="Gtk.Bin">
     3.8 +    <itemgroups />
     3.9 +    <signals />
    3.10 +  </object>
    3.11  </objects>
    3.12 \ No newline at end of file
     4.1 --- a/translations/en.translation	Sun Oct 09 20:37:53 2011 +0100
     4.2 +++ b/translations/en.translation	Sun Oct 09 21:03:09 2011 +0100
     4.3 @@ -6,7 +6,7 @@
     4.4  <translation id="bttnClose">Close</translation>
     4.5  <translation id="bttnCreate">Create</translation>
     4.6  <!-- Main Window -->
     4.7 -<translation id="statusPanelPoints">{0} pts / {1} pts</translation>
     4.8 +<translation id="statusPanelPoints">{0}{2} / {1}{3}</translation>
     4.9  <!-- Main Window / Menus -->
    4.10  <translation id="menuFile">_File</translation>
    4.11  <translation id="menuEdit">_Edit</translation>