diff options
Diffstat (limited to 'src/gui/npclistdialog.h')
-rw-r--r-- | src/gui/npclistdialog.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/gui/npclistdialog.h b/src/gui/npclistdialog.h index e3cf375b..6c1e02e3 100644 --- a/src/gui/npclistdialog.h +++ b/src/gui/npclistdialog.h @@ -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 @@ -23,14 +22,16 @@ #ifndef GUI_NPCLISTDIALOG_H #define GUI_NPCLISTDIALOG_H -#include <vector> +#include "window.h" #include <guichan/actionlistener.hpp> #include <guichan/listmodel.hpp> -#include "window.h" +#include <vector> +#ifdef EATHENA_SUPPORT class Network; +#endif /** * The npc list dialog. @@ -46,7 +47,11 @@ class NpcListDialog : public Window, public gcn::ActionListener, * * @see Window::Window */ +#ifdef TMWSERV_SUPPORT + NpcListDialog(); +#else NpcListDialog(Network *network); +#endif /** * Called when receiving actions from the widgets. @@ -64,6 +69,11 @@ class NpcListDialog : public Window, public gcn::ActionListener, std::string getElementAt(int i); /** + * Adds an item to the option list. + */ + void addItem(const std::string &); + + /** * Fills the options list for an NPC dialog. * * @param itemString A string with the options separated with colons. @@ -75,6 +85,8 @@ class NpcListDialog : public Window, public gcn::ActionListener, */ void reset(); + void setVisible(bool visible); + /** * Requests the listbox to take focus for input and sets window width * to the last known setting. @@ -82,11 +94,10 @@ class NpcListDialog : public Window, public gcn::ActionListener, void requestFocus(); private: +#ifdef EATHENA_SUPPORT Network *mNetwork; +#endif gcn::ListBox *mItemList; - gcn::ScrollArea *scrollArea; - gcn::Button *okButton; - gcn::Button *cancelButton; std::vector<std::string> mItems; }; |