summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 8e9f13e8..0ef187be 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -21,6 +21,7 @@
#include "gui/buy.h"
+#include "client.h"
#include "playerinfo.h"
#include "shopitem.h"
#include "units.h"
@@ -222,6 +223,15 @@ void BuyDialog::valueChanged(const gcn::SelectionEvent &event)
mSlider->gcn::Slider::setScale(1, mMaxItems);
}
+void BuyDialog::mouseClicked(gcn::MouseEvent &mouseEvent)
+{
+ if (mouseEvent.getSource() == mShopItemList &&
+ isDoubleClick(mShopItemList->getSelected()))
+ {
+ action(gcn::ActionEvent(mBuyButton, mBuyButton->getActionEventId()));
+ }
+}
+
void BuyDialog::updateButtonsAndLabels()
{
const int selectedItem = mShopItemList->getSelected();