diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 10:52:07 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 10:52:07 -0600 |
commit | 34489687667ba5622ad3ba109381ee4c39da24e5 (patch) | |
tree | 07bd6b25d962a5f77d7c44a40ad01ce79af89304 /src | |
parent | a2aa7c577b6d69b8185111a8ea8781957ce45b38 (diff) | |
download | mana-34489687667ba5622ad3ba109381ee4c39da24e5.tar.gz mana-34489687667ba5622ad3ba109381ee4c39da24e5.tar.bz2 mana-34489687667ba5622ad3ba109381ee4c39da24e5.tar.xz mana-34489687667ba5622ad3ba109381ee4c39da24e5.zip |
Show party name in party window
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/partywindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/partywindow.h | 4 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/tmwserv/generalhandler.cpp | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index b13f4b0b..52a7b97e 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -65,6 +65,16 @@ PartyWindow::~PartyWindow() delete_all(mMembers); } +void PartyWindow::setPartyName(std::string name) +{ + setCaption(strprintf(_("Party (%s)"), name.c_str())); +} + +void PartyWindow::clearPartyName() +{ + setCaption(_("Party")); +} + PartyMember *PartyWindow::findMember(int id) const { PartyList::const_iterator it = mMembers.find(id); diff --git a/src/gui/partywindow.h b/src/gui/partywindow.h index 65e8d772..c3fe75f4 100644 --- a/src/gui/partywindow.h +++ b/src/gui/partywindow.h @@ -65,6 +65,10 @@ class PartyWindow : public Window, gcn::ActionListener */ ~PartyWindow(); + void setPartyName(std::string name); + + void clearPartyName(); + /** * Find a party member based on ID. Returns NULL if not found. */ diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 072297dd..2f1b02ab 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -91,6 +91,7 @@ void PartyHandler::handleMessage(MessageIn &msg) int length = msg.readInt16(); std::string party = msg.readString(24); + partyWindow->setPartyName(party); int count = (length - 28) / 46; for (int i = 0; i < count; i++) diff --git a/src/net/tmwserv/generalhandler.cpp b/src/net/tmwserv/generalhandler.cpp index f7f813a9..5886aafb 100644 --- a/src/net/tmwserv/generalhandler.cpp +++ b/src/net/tmwserv/generalhandler.cpp @@ -20,6 +20,7 @@ */ #include "gui/inventorywindow.h" +#include "gui/partywindow.h" #include "net/tmwserv/generalhandler.h" @@ -144,6 +145,7 @@ void GeneralHandler::tick() void GeneralHandler::guiWindowsLoaded() { inventoryWindow->setSplitAllowed(true); + partyWindow->clearPartyName(); } void GeneralHandler::guiWindowsUnloaded() |