summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.cpp20
-rw-r--r--src/gui/windows/buydialog.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index b885cc8a6..809ddf88a 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -385,6 +385,26 @@ void BuyDialog::sort()
}
}
+void BuyDialog::close()
+{
+ switch (mNpcId)
+ {
+ case Nick:
+ case Items:
+ break;
+ case Market:
+ marketHandler->close();
+ break;
+ case Cash:
+ cashShopHandler->close();
+ break;
+ default:
+ buySellHandler->close();
+ break;
+ }
+ Window::close();
+}
+
void BuyDialog::action(const ActionEvent &event)
{
const std::string &eventId = event.getId();
diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h
index 56735baca..a96e0ff28 100644
--- a/src/gui/windows/buydialog.h
+++ b/src/gui/windows/buydialog.h
@@ -133,6 +133,8 @@ class BuyDialog final : public Window,
void sort();
+ void close() override final;
+
/**
* Returns true if any instances exist.
*/