Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
diff FrmMainWindow.cs @ 99:8777e4f64d8e
Fixes #335: Show current points total in status bar
* Add label to status bar and set the text on points value change
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 16 Jan 2011 19:50:48 +0000 |
parents | fac0636ae13b |
children | 1bd748721040 |
line wrap: on
line diff
--- a/FrmMainWindow.cs Sun Jan 02 21:03:15 2011 +0000 +++ b/FrmMainWindow.cs Sun Jan 16 19:50:48 2011 +0000 @@ -400,7 +400,7 @@ private void OnPointsValueChanged(WarFoundryObject obj, double before, double after) { - //Set points in panel + SetPointsPanelText(); } private void OnFailedUnitRequirement(List<FailedUnitRequirement> failedRequirement) @@ -655,7 +655,14 @@ private void SetPointsPanelText() { - //TODO: Set the points value in the status bar + if (WarFoundryCore.CurrentArmy != null) + { + lblTotalPoints.Text = Translation.GetTranslation("statusPanelPoints", "{0}pts of {1} pts", WarFoundryCore.CurrentArmy.Points, WarFoundryCore.CurrentArmy.MaxPoints); + } + else + { + lblTotalPoints.Text = ""; + } } private void commandStack_CommandStackUpdated()