summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-18 00:00:46 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-18 00:00:46 +0300
commit129f749d057e3b96161630934da7b2d89dec3c71 (patch)
tree1a11c98aaf08a46d544e9b3acf3910a560546c8b /src/gui/popups
parent39ab9ebf7464f77f079a8edecd3f43870245b8ee (diff)
downloadmanaplus-129f749d057e3b96161630934da7b2d89dec3c71.tar.gz
manaplus-129f749d057e3b96161630934da7b2d89dec3c71.tar.bz2
manaplus-129f749d057e3b96161630934da7b2d89dec3c71.tar.xz
manaplus-129f749d057e3b96161630934da7b2d89dec3c71.zip
Add eathena defines into being.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/beingpopup.cpp4
-rw-r--r--src/gui/popups/popupmenu.cpp8
-rw-r--r--src/gui/popups/popupmenu.h2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index f0a8868f4..0592189aa 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -251,6 +251,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
label3 = nullptr;
}
+#ifdef EATHENA_SUPPORT
if (!b->getBuyBoard().empty())
{
// TRANSLATORS: being popup label
@@ -259,6 +260,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
label4->adjustSize();
}
else
+#endif
{
label7 = label6;
label6 = label5;
@@ -266,6 +268,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
label4 = nullptr;
}
+#ifdef EATHENA_SUPPORT
if (!b->getSellBoard().empty())
{
// TRANSLATORS: being popup label
@@ -274,6 +277,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
label5->adjustSize();
}
else
+#endif
{
label7 = label6;
label6 = label5;
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index b16dd2ff4..b81ab29dd 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -234,7 +234,9 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
mBrowserBox->addRow("/navigateto 'NAME'", _("Move"));
addPlayerMisc();
addBuySell(being);
+#ifdef EATHENA_SUPPORT
addChat(being);
+#endif
break;
}
@@ -266,7 +268,9 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
// TRANSLATORS: popup menu item
// TRANSLATORS: add comment to npc
mBrowserBox->addRow("addcomment", _("Add comment"));
+#ifdef EATHENA_SUPPORT
addChat(being);
+#endif
break;
case ActorType::Monster:
@@ -1407,13 +1411,13 @@ void PopupMenu::handleLink(const std::string &link,
if (Widget::widgetExists(mWindow))
mWindow->setSticky(true);
}
+#ifdef EATHENA_SUPPORT
else if (link == "join chat" && being)
{
const ChatObject *const chat = being->getChat();
if (chat)
chatHandler->joinChat(chat, "");
}
-#ifdef EATHENA_SUPPORT
else if (link == "fire mercenary")
{
mercenaryHandler->fire();
@@ -2443,6 +2447,7 @@ void PopupMenu::addParty(const std::string &nick)
}
}
+#ifdef EATHENA_SUPPORT
void PopupMenu::addChat(const Being *const being)
{
if (!being)
@@ -2457,6 +2462,7 @@ void PopupMenu::addChat(const Being *const being)
mBrowserBox->addRow("##3---");
}
}
+#endif
void PopupMenu::addPlayerMisc()
{
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index d523307bf..5d6420662 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -187,7 +187,9 @@ class PopupMenu final : public Popup, public LinkHandler
void addWindowMenu(Window *const window);
+#ifdef EATHENA_SUPPORT
void addChat(const Being *const being);
+#endif
void showGMPopup();