diff options
author | Freeyorp <Freeyorp101@NOSPAM@hotmail.com> | 2009-05-11 00:45:17 +1200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-10 11:38:37 -0600 |
commit | 7f15330d969e5c973429d03ca767551e7b67c3c3 (patch) | |
tree | 45a1688f5b58ccec447dc501d74447363aab9d42 /src/gui/partywindow.cpp | |
parent | f3ab737d9d508aaa25b01b462fa9c8f6c7a0d5d2 (diff) | |
download | mana-7f15330d969e5c973429d03ca767551e7b67c3c3.tar.gz mana-7f15330d969e5c973429d03ca767551e7b67c3c3.tar.bz2 mana-7f15330d969e5c973429d03ca767551e7b67c3c3.tar.xz mana-7f15330d969e5c973429d03ca767551e7b67c3c3.zip |
Add support for viewing the health and maximum health of other nearby members of your party.
Diffstat (limited to 'src/gui/partywindow.cpp')
-rw-r--r-- | src/gui/partywindow.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index b3c6c74c..5172f4bb 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -34,12 +34,12 @@ PartyWindow::PartyWindow() : Window(_("Party")) { setWindowName("Party"); setVisible(false); - setResizable(false); + setResizable(true); setSaveVisible(true); setCloseButton(true); - setMinWidth(110); + setMinWidth(200); setMinHeight(200); - setDefaultSize(620, 300, 110, 200); + setDefaultSize(620, 300, 200, 200); loadWindowState(); setVisible(false); // Do not start out visible @@ -58,7 +58,6 @@ void PartyWindow::draw(gcn::Graphics *graphics) PartyMember *PartyWindow::findMember(int id) const { PartyList::const_iterator it = mMembers.find(id); - if (it == mMembers.end()) return NULL; else @@ -114,6 +113,13 @@ void PartyWindow::updateMember(int id, const std::string &memberName, } } +void PartyWindow::updateMemberHP(int id, int hp, int maxhp) +{ + PartyMember *player = findOrCreateMember(id); + player->avatar->setHp(hp); + player->avatar->setMaxHp(maxhp); +} + void PartyWindow::removeMember(int id) { mMembers.erase(id); |