summaryrefslogtreecommitdiff
path: root/src/gui/guildwindow.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-15 15:42:04 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-15 15:42:04 +0000
commite2e4ceb9fa8a72ad94853f74724676fff82b15c0 (patch)
tree5336955366e76266f92dbef4da6e632b84714cdf /src/gui/guildwindow.cpp
parentd4cc1ded15daa0677e710013640c90b1aadd6bd0 (diff)
downloadmana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.tar.gz
mana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.tar.bz2
mana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.tar.xz
mana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.zip
Added online status of guild members
Diffstat (limited to 'src/gui/guildwindow.cpp')
-rw-r--r--src/gui/guildwindow.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp
index 7b69f9bf..7237a870 100644
--- a/src/gui/guildwindow.cpp
+++ b/src/gui/guildwindow.cpp
@@ -84,7 +84,7 @@ GuildWindow::~GuildWindow()
void GuildWindow::update()
{
-
+ updateTab();
}
void GuildWindow::draw(gcn::Graphics *g)
@@ -172,7 +172,7 @@ void GuildWindow::newGuildTab(const std::string &guildName)
{
// Create new tab
- ListBox *list = new ListBox();
+ GuildListBox *list = new GuildListBox();
list->setListModel(player_node->getGuild(guildName));
ScrollArea *sa = new ScrollArea(list);
sa->setDimension(gcn::Rectangle(5, 5, 135, 250));
@@ -224,7 +224,8 @@ short GuildWindow::getSelectedGuild()
return 0;
}
-void GuildWindow::openAcceptDialog(const std::string &inviterName, const std::string &guildName)
+void GuildWindow::openAcceptDialog(const std::string &inviterName,
+ const std::string &guildName)
{
std::string msg = inviterName + " has invited you to join the guild " + guildName;
chatWindow->chatLog(msg, BY_SERVER);
@@ -248,6 +249,17 @@ void GuildWindow::removeTab(int guildId)
{
gcn::Tab *tab = mGuildTabs->getTab(guild->getName());
mGuildTabs->removeTab(tab);
+ updateTab();
}
mGuildTabs->logic();
}
+
+void GuildWindow::setOnline(const std::string &guildName, const std::string &member,
+ bool online)
+{
+ GuildListBox *box = dynamic_cast<GuildListBox*>(mGuildTabs->getWidget(guildName));
+ if (box)
+ {
+ box->setOnlineStatus(member, online);
+ }
+}