comparison Widgets/UnitDisplayWidget.cs @ 64:e3fe48c4d794

Re #60: Add UI to add/remove/edit weapons in GTK * Add most of basic "edit" interface, based on "add" interface TODO: * Set initial values * Warn when setting to 0
author IBBoard <dev@ibboard.co.uk>
date Thu, 02 Sep 2010 20:12:21 +0000
parents 04c0f6a7625c
children 77448375d2f9
comparison
equal deleted inserted replaced
63:c2d79b4209e3 64:e3fe48c4d794
270 { 270 {
271 SetUnitEquipmentNumericAmountCommand cmd = new SetUnitEquipmentNumericAmountCommand(unit, item, 0); 271 SetUnitEquipmentNumericAmountCommand cmd = new SetUnitEquipmentNumericAmountCommand(unit, item, 0);
272 stack.Execute(cmd); 272 stack.Execute(cmd);
273 } 273 }
274 } 274 }
275
276 protected virtual void HandleEditButtonClicked(object sender, System.EventArgs e)
277 {
278 UnitEquipmentItem item = GetSelectedEquipmentItem();
279 log.Debug("Edit " + item);
280
281 if (item != null)
282 {
283 EditEquipmentUIControl editEquipment = new EditEquipmentUIControl(unit, item, stack);
284 editEquipment.Show();
285 }
286 }
287
288
275 } 289 }
276 } 290 }