Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
diff UI/EquipmentAmountControl.cs @ 42:d06c2e390a14
Re #117: Add percentage and number boxes to equipment item dialogs
* Add new widget to "Edit equipment" dialog
* Still needs "OK" button functionality re-implementing
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 06 Sep 2009 19:58:39 +0000 |
parents | 4fc87d6e6119 |
children | 7ace7d2249ac |
line wrap: on
line diff
--- a/UI/EquipmentAmountControl.cs Sun Sep 06 19:31:49 2009 +0000 +++ b/UI/EquipmentAmountControl.cs Sun Sep 06 19:58:39 2009 +0000 @@ -208,5 +208,21 @@ return rbPercentage.Checked; } } + + public void SetUnitEquipmentItemAmount(double equipAmountNum, bool isRatio) + { + if (isRatio) + { + percentage.Value = (decimal)equipAmountNum; + } + else if (equipAmountNum == WarFoundryCore.INFINITY) + { + rbEquipAll.Checked = true; + } + else + { + numeric.Value = (int)equipAmountNum; + } + } } }