diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-02 03:11:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-02 03:11:08 +0300 |
commit | 205b331825d2d100a442d2d0399d477850d395d3 (patch) | |
tree | 1fd773e2af0234b78945364d9e7cfe21d4f2a9da /src/being.cpp | |
parent | 2f2ec6025c0eb43c475964187d815d6598b00f01 (diff) | |
download | plus-205b331825d2d100a442d2d0399d477850d395d3.tar.gz plus-205b331825d2d100a442d2d0399d477850d395d3.tar.bz2 plus-205b331825d2d100a442d2d0399d477850d395d3.tar.xz plus-205b331825d2d100a442d2d0399d477850d395d3.zip |
Add players gender sugn in popup menus and being popups.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp index e38e60026..944a05cb8 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -1455,6 +1455,20 @@ void Being::flashName(int time) mDispName->flash(time); } +std::string Being::getGenderSign() const +{ + if (config.getBoolValue("showgender")) + { + if (getGender() == GENDER_FEMALE) + return "\u2640"; + else if (getGender() == GENDER_MALE) + return "\u2642"; + else + return ""; + } + return ""; +} + void Being::showName() { delete mDispName; @@ -1469,13 +1483,7 @@ void Being::showName() if (config.getBoolValue("showlevel") && getLevel() != 0) mDisplayName += toString(getLevel()); - if (config.getBoolValue("showgender")) - { - if (getGender() == GENDER_FEMALE) - mDisplayName += "\u2640"; - else if (getGender() == GENDER_MALE) - mDisplayName += "\u2642"; - } + mDisplayName += getGenderSign(); } if (getType() == MONSTER) |