From 5bbb89e2dbcafb80f33030ba2ffef6d2515b9209 Mon Sep 17 00:00:00 2001 From: David Athay Date: Mon, 28 Apr 2008 17:21:22 +0000 Subject: Added party invite dialog --- src/gui/partywindow.h | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src/gui/partywindow.h') 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 #include -class Player; +#include +#include + +/** + * 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: /** @@ -44,6 +55,11 @@ class PartyWindow : public Window */ PartyWindow(); + /** + * Release all the players created + */ + ~PartyWindow(); + /** * Draws the party window */ @@ -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 PartyList; + typedef std::vector PartyList; PartyList mPartyMembers; + std::string mPartyInviter; + ConfirmDialog *acceptDialog; }; extern PartyWindow *partyWindow; -- cgit v1.2.3-70-g09d2