diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-09-29 23:59:08 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-09-29 23:59:08 +0000 |
commit | e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3 (patch) | |
tree | e8dc775e12f6b4eb0a6d56448f05286c774bbb8a /src/gui/char_select.cpp | |
parent | 0e8c09433f3a193b5a94a1ad572d8237113cdfbf (diff) | |
download | mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.gz mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.bz2 mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.xz mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.zip |
Merged trunk changes from revision 2618 to 2716 into the 0.1.0 branch.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r-- | src/gui/char_select.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index 042a5be8..3e6c4a5f 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -224,6 +224,28 @@ void CharSelectDialog::logic() updatePlayerInfo(); } +bool CharSelectDialog::selectByName(const std::string &name) +{ + if (mCharInfo->isLocked()) + return false; + + unsigned int oldPos = mCharInfo->getPos(); + + mCharInfo->select(0); + do { + LocalPlayer *player = mCharInfo->getEntry(); + + if (player && player->getName() == name) + return true; + + mCharInfo->next(); + } while (mCharInfo->getPos()); + + mCharInfo->select(oldPos); + + return false; +} + std::string CharSelectDialog::getName() { return mNameLabel->getCaption(); |