diff options
Diffstat (limited to 'src/gui/buysell.cpp')
-rw-r--r-- | src/gui/buysell.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp index df222797..b9a6a1dc 100644 --- a/src/gui/buysell.cpp +++ b/src/gui/buysell.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +25,9 @@ #include "../npc.h" #include "../net/messageout.h" -#include "../net/protocol.h" +#ifdef EATHENA_SUPPORT +#include "../net/ea/protocol.h" +#endif #include "../utils/gettext.h" @@ -43,16 +44,18 @@ BuySellDialog::BuySellDialog(Network *network): for (const char **curBtn = buttonNames; *curBtn; curBtn++) { Button *btn = new Button(gettext(*curBtn), *curBtn, this); - if (!buyButton) buyButton = btn; // For focus request + if (!buyButton) + buyButton = btn; // For focus request btn->setPosition(x, y); add(btn); x += btn->getWidth() + 10; } buyButton->requestFocus(); - setDefaultSize(x + getPadding(), (2 * y + buyButton->getHeight() + - getTitleBarHeight()), ImageRect::CENTER); + setContentSize(x, 2 * y + buyButton->getHeight()); + center(); + setDefaultSize(); loadWindowState(); } @@ -77,7 +80,7 @@ void BuySellDialog::action(const gcn::ActionEvent &event) setVisible(false); int action = 0; - NPC::mTalking = false; + NPC::isTalking = false; if (event.getId() == "Buy") { @@ -93,8 +96,10 @@ void BuySellDialog::action(const gcn::ActionEvent &event) return; } +#ifdef EATHENA_SUPPORT MessageOut outMsg(mNetwork); outMsg.writeInt16(CMSG_NPC_BUY_SELL_REQUEST); outMsg.writeInt32(current_npc); outMsg.writeInt8(action); +#endif } |