summaryrefslogtreecommitdiff
path: root/src/gui/partywindow.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-19 09:01:46 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-19 09:01:46 -0600
commit822690170b501397b86626e13b5a542712a1719d (patch)
tree327bd24839195d677beca694b9a8fca7b18245ca /src/gui/partywindow.cpp
parent124865b5d67c8c7b199046d19380e1e154ee99e4 (diff)
downloadmana-822690170b501397b86626e13b5a542712a1719d.tar.gz
mana-822690170b501397b86626e13b5a542712a1719d.tar.bz2
mana-822690170b501397b86626e13b5a542712a1719d.tar.xz
mana-822690170b501397b86626e13b5a542712a1719d.zip
Flesh out eAtehan party handling
Diffstat (limited to 'src/gui/partywindow.cpp')
-rw-r--r--src/gui/partywindow.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index c13a0810..d9ba5a63 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -42,6 +42,7 @@ PartyWindow::PartyWindow() : Window(_("Party"))
setDefaultSize(620, 300, 110, 200);
loadWindowState();
+ setVisible(false); // Do not start out visible
}
PartyWindow::~PartyWindow()
@@ -72,8 +73,8 @@ PartyMember *PartyWindow::findOrCreateMember(int id)
{
member = new PartyMember;
member->avatar = new Avatar("");
- add(member->avatar, 0, (mMembers.size() - 1) * 14);
mMembers[id] = member;
+ add(member->avatar, 0, (mMembers.size() - 1) * 14);
}
return member;
@@ -99,9 +100,7 @@ int PartyWindow::findMember(const std::string &name) const
void PartyWindow::updateMember(int id, const std::string &memberName,
bool leader, bool online)
{
- // create new party member
PartyMember *player = findOrCreateMember(id);
- player->id = id;
player->name = memberName;
player->leader = leader;
player->online = online;
@@ -189,3 +188,10 @@ void PartyWindow::action(const gcn::ActionEvent &event)
mPartyInviter = "";
}
}
+
+void PartyWindow::clear()
+{
+ Window::clear();
+
+ mMembers.clear();
+}