From 73ccb1a8eacd7cb339eca67d7312107739f03605 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 22 Nov 2008 01:56:05 +0000 Subject: While there is still a small visual artifact, this patch fixes the buy window so that it properly reports how much money you have. --- src/gui/buy.cpp | 3 --- src/gui/buy.h | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index a4574eb7..597a7cad 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -156,9 +156,6 @@ void BuyDialog::action(const gcn::ActionEvent &event) mSlider->setValue(mAmountItems); updateButtonsAndLabels(); } - // TODO: Actually we'd have a bug elsewhere if this check for the number - // of items to be bought ever fails, Bertram removed the assertions, is - // there a better way to ensure this fails in an _obivous_ way in C++? else if (event.getId() == "buy" && mAmountItems > 0 && mAmountItems <= mMaxItems) { diff --git a/src/gui/buy.h b/src/gui/buy.h index 0915385a..3b94bbaa 100644 --- a/src/gui/buy.h +++ b/src/gui/buy.h @@ -117,9 +117,9 @@ class BuyDialog : public Window, public gcn::ActionListener, ShopItems *mShopItems; - int mMoney; - int mAmountItems; - int mMaxItems; + Uint32 mMoney; + Uint32 mAmountItems; + Uint32 mMaxItems; }; #endif -- cgit v1.2.3-70-g09d2