diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-06 19:09:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-06 19:09:39 +0300 |
commit | f96861c0115f6808d8246b3e6defc828ab3a255e (patch) | |
tree | 76fa7c407187399e638cc514a59263d0468066e4 /src/gui/windows | |
parent | 548bcd5e5450afefbbe2625da16aa23333e6b69a (diff) | |
download | manaplus-f96861c0115f6808d8246b3e6defc828ab3a255e.tar.gz manaplus-f96861c0115f6808d8246b3e6defc828ab3a255e.tar.bz2 manaplus-f96861c0115f6808d8246b3e6defc828ab3a255e.tar.xz manaplus-f96861c0115f6808d8246b3e6defc828ab3a255e.zip |
Add option for creating screenshots on each complete trade.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/tradewindow.cpp | 9 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 7a835b686..edd685f30 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -23,6 +23,7 @@ #include "gui/windows/tradewindow.h" #include "configuration.h" +#include "game.h" #include "item.h" #include "units.h" @@ -296,6 +297,14 @@ void TradeWindow::receivedOk(const bool own) setStatus(ACCEPTING); } +void TradeWindow::completeTrade() +{ + if (config.getBoolValue("tradescreenshot")) + Game::createScreenshot(); + setVisible(Visible_false); + reset(); +} + void TradeWindow::tradeItem(const Item *const item, const int quantity, const bool check) const { diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h index d82714816..8ad021cd6 100644 --- a/src/gui/windows/tradewindow.h +++ b/src/gui/windows/tradewindow.h @@ -164,6 +164,8 @@ class TradeWindow final : public Window, bool isInpupFocused() const A_WARN_UNUSED; + void completeTrade(); + private: enum Status { |