summaryrefslogtreecommitdiff
path: root/src/gui/partywindow.h
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-28 17:21:22 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-28 17:21:22 +0000
commit5bbb89e2dbcafb80f33030ba2ffef6d2515b9209 (patch)
treebc0660c85891a0fae0acc7dea80547962f39ff1a /src/gui/partywindow.h
parenta6731dd30a4ab7b2b19af18295293c13895b664d (diff)
downloadmana-client-5bbb89e2dbcafb80f33030ba2ffef6d2515b9209.tar.gz
mana-client-5bbb89e2dbcafb80f33030ba2ffef6d2515b9209.tar.bz2
mana-client-5bbb89e2dbcafb80f33030ba2ffef6d2515b9209.tar.xz
mana-client-5bbb89e2dbcafb80f33030ba2ffef6d2515b9209.zip
Added party invite dialog
Diffstat (limited to 'src/gui/partywindow.h')
-rw-r--r--src/gui/partywindow.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/gui/partywindow.h b/src/gui/partywindow.h
index b74b1411..fe126c2e 100644
--- a/src/gui/partywindow.h
+++ b/src/gui/partywindow.h
@@ -25,18 +25,29 @@
#define _TMW_PARTYWINDOW_H
#include "window.h"
+#include "confirm_dialog.h"
#include <string>
#include <vector>
-class Player;
+#include <guichan/actionevent.hpp>
+#include <guichan/actionlistener.hpp>
+
+/**
+ * Party Member
+ * Used for storing players in the party
+ */
+struct PartyMember
+{
+ std::string name;
+};
/**
* Party Window.
*
* \ingroup Interface
*/
-class PartyWindow : public Window
+class PartyWindow : public Window, gcn::ActionListener
{
public:
/**
@@ -45,6 +56,11 @@ class PartyWindow : public Window
PartyWindow();
/**
+ * Release all the players created
+ */
+ ~PartyWindow();
+
+ /**
* Draws the party window
*/
void draw(gcn::Graphics *graphics);
@@ -52,21 +68,28 @@ class PartyWindow : public Window
/**
* Add party member
*/
- void addPartyMember(Player *player);
+ void addPartyMember(const std::string &memberName);
/**
* Remove party member
*/
- void removePartyMember(Player *player);
+ void removePartyMember(const std::string &memberName);
/**
* Show party invite
*/
void showPartyInvite(const std::string &inviter);
+ /**
+ * Handle events
+ */
+ void action(const gcn::ActionEvent &event);
+
private:
- typedef std::vector<Player*> PartyList;
+ typedef std::vector<PartyMember*> PartyList;
PartyList mPartyMembers;
+ std::string mPartyInviter;
+ ConfirmDialog *acceptDialog;
};
extern PartyWindow *partyWindow;