summaryrefslogtreecommitdiff
path: root/src/gui/shoplistbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-09-12 08:15:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-09-12 08:15:45 +0000
commit1afcf2608c0a466d2df21faea1530955cc8061fc (patch)
tree27f279ca5d012ddd3f805d531e093a2561c15abe /src/gui/shoplistbox.cpp
parente5038965dbea0dbc7269c4114cbdaddd6899c665 (diff)
downloadmana-1afcf2608c0a466d2df21faea1530955cc8061fc.tar.gz
mana-1afcf2608c0a466d2df21faea1530955cc8061fc.tar.bz2
mana-1afcf2608c0a466d2df21faea1530955cc8061fc.tar.xz
mana-1afcf2608c0a466d2df21faea1530955cc8061fc.zip
Allowed selection of items that cannot be afforded, so that their descriptions
are still accessible. Also made sure the player's money value of ShopItemList gets updated.
Diffstat (limited to 'src/gui/shoplistbox.cpp')
-rw-r--r--src/gui/shoplistbox.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp
index 946f518b..4efd6e64 100644
--- a/src/gui/shoplistbox.cpp
+++ b/src/gui/shoplistbox.cpp
@@ -129,24 +129,8 @@ void ShopListBox::mousePressed(gcn::MouseEvent &event)
{
if (event.getButton() == gcn::MouseEvent::LEFT)
{
- bool enoughMoney = false;
- int y = event.getY();
-
- if (mShopItems && mPriceCheck)
- {
- if (mPlayerMoney >= mShopItems->at(y / mRowHeight).price)
- enoughMoney = true;
- }
- else // Old Behaviour
- {
- enoughMoney = true;
- }
-
- if (enoughMoney)
- {
- setSelected(y / mRowHeight);
- generateAction();
- }
+ setSelected(event.getY() / mRowHeight);
+ generateAction();
}
}