summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.h
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2006-09-13 20:19:58 +0000
committerYohann Ferreira <bertram@cegetel.net>2006-09-13 20:19:58 +0000
commit7ac37a016e3a401e0cfb277cc957e760d209ae3e (patch)
tree93670668fe725fb180ad582df6d5cb082c0b3beb /src/gui/serverdialog.h
parent81c7e13077dde99ea360f2ab8432aa48444f3b88 (diff)
downloadMana-7ac37a016e3a401e0cfb277cc957e760d209ae3e.tar.gz
Mana-7ac37a016e3a401e0cfb277cc957e760d209ae3e.tar.bz2
Mana-7ac37a016e3a401e0cfb277cc957e760d209ae3e.tar.xz
Mana-7ac37a016e3a401e0cfb277cc957e760d209ae3e.zip
Added a skinned reusable dropdown widget and used it in the server dialog.
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r--src/gui/serverdialog.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index 687290f3..c0b8275d 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -24,20 +24,22 @@
#ifndef _TMW_SERVERDIALOG_H
#define _TMW_SERVERDIALOG_H
-#include <iosfwd>
-#include <vector>
+#include <iosfwd>
+#include <vector>
-#include <guichan/actionlistener.hpp>
+#include <guichan/actionlistener.hpp>
#include <guichan/listmodel.hpp>
-
+//#include <guichan/widgets/dropdown.hpp>
+#include "./widgets/dropdown.h"
+
#include "login.h"
#include "window.h"
-
+
#include "../guichanfwd.h"
#include "../net/network.h"
-class LoginData;
+class LoginData;
/**
* A server structure to keep pairs of servers and ports.
@@ -54,7 +56,7 @@ struct Server {
/**
* Server and Port List Model
*/
-class ServersListModel : public gcn::ListModel
+class ServersListModel : public gcn::ListModel
{
public:
/**
@@ -76,7 +78,7 @@ class ServersListModel : public gcn::ListModel
/**
* Add an Element at the beginning of the server list
*/
- void addFirstElement(Server server);
+ void addFirstElement(Server server);
private:
std::vector<Server> servers;
@@ -85,7 +87,7 @@ class ServersListModel : public gcn::ListModel
/**
* Listener used for handling the DropDown in the server Dialog.
*/
-class DropDownListener : public gcn::ActionListener
+class DropDownListener : public gcn::ActionListener
{
public:
DropDownListener(gcn::TextField *serverNameField,
@@ -113,7 +115,7 @@ class DropDownListener : public gcn::ActionListener
*
* \ingroup Interface
*/
-class ServerDialog : public Window, public gcn::ActionListener
+class ServerDialog : public Window, public gcn::ActionListener
{
public:
/**
@@ -140,7 +142,7 @@ class ServerDialog : public Window, public gcn::ActionListener
gcn::Button *mCancelButton;
// TODO : child the Dropdown List to skin it.
- gcn::DropDown *mMostUsedServersDropDown;
+ DropDown *mMostUsedServersDropDown;
gcn::ListBox *mMostUsedServersListBox;
gcn::ScrollArea *mMostUsedServersScrollArea;
ServersListModel *mMostUsedServersListModel;