diff options
author | Freeyorp <Freeyorp101@NOSPAM@hotmail.com> | 2009-05-21 17:45:51 +1200 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-21 02:14:00 -0400 |
commit | 244b0d9b46128ab3498da078020c8bbf8c65f69f (patch) | |
tree | 92ebbd6c83430d4e9785087d1edbaecc0ff3e8ae /src/gui | |
parent | 431e131ea8c38929d2ee61bd5066f856213882a1 (diff) | |
download | mana-244b0d9b46128ab3498da078020c8bbf8c65f69f.tar.gz mana-244b0d9b46128ab3498da078020c8bbf8c65f69f.tar.bz2 mana-244b0d9b46128ab3498da078020c8bbf8c65f69f.tar.xz mana-244b0d9b46128ab3498da078020c8bbf8c65f69f.zip |
Display the party leaders name in bold font
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/partywindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/avatar.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/avatar.h | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 68e5a371..5e384413 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -123,6 +123,7 @@ void PartyWindow::updateMember(int id, const std::string &memberName, member->name = memberName; member->leader = leader; member->online = online; + member->avatar->setDisplayBold(leader); member->avatar->setName(memberName); member->avatar->setOnline(online); diff --git a/src/gui/widgets/avatar.cpp b/src/gui/widgets/avatar.cpp index 16c77233..f7273c75 100644 --- a/src/gui/widgets/avatar.cpp +++ b/src/gui/widgets/avatar.cpp @@ -23,6 +23,7 @@ #include "localplayer.h" +#include "gui/gui.h" #include "gui/widgets/icon.h" #include "gui/widgets/label.h" @@ -39,7 +40,8 @@ namespace { Avatar::Avatar(): mHp(0), - mMaxHp(0) + mMaxHp(0), + mDisplayBold(false) { setOpaque(false); @@ -111,6 +113,8 @@ void Avatar::updateAvatarLabel() if (mName != player_node->getName() && mMaxHp != 0) ss << " (" << mHp << "/" << mMaxHp << ")"; + if (mDisplayBold) + mLabel->setFont(boldFont); mLabel->setCaption(ss.str()); mLabel->adjustSize(); } diff --git a/src/gui/widgets/avatar.h b/src/gui/widgets/avatar.h index 32586668..dbe30a94 100644 --- a/src/gui/widgets/avatar.h +++ b/src/gui/widgets/avatar.h @@ -51,6 +51,8 @@ public: void setMaxHp(int maxHp); + void setDisplayBold(bool displayBold) { mDisplayBold = displayBold; } + private: void updateAvatarLabel(); @@ -59,6 +61,7 @@ private: int mMaxHp; Icon *mStatus; gcn::Label *mLabel; + bool mDisplayBold; }; #endif // AVATAR_H |