mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-27 19:56:38 +00:00
Only print the player name if it doesn't match the profile
This commit is contained in:
parent
8634b6c3ac
commit
d6916c35bc
1 changed files with 7 additions and 4 deletions
|
|
@ -197,7 +197,8 @@ namespace MWGui
|
|||
title << " (#{OMWEngine:Level} " << signature.mPlayerLevel << " "
|
||||
<< MyGUI::TextIterator::toTagsString(MyGUI::UString(className)) << ")";
|
||||
|
||||
mCharacterSelection->addItem(MyGUI::LanguageManager::getInstance().replaceTags(title.str()));
|
||||
const MyGUI::UString playerDesc = MyGUI::LanguageManager::getInstance().replaceTags(title.str());
|
||||
mCharacterSelection->addItem(playerDesc, signature.mPlayerName);
|
||||
|
||||
if (mCurrentCharacter == &*it
|
||||
|| (!mCurrentCharacter && !mSaving
|
||||
|
|
@ -413,9 +414,11 @@ namespace MWGui
|
|||
|
||||
std::stringstream text;
|
||||
|
||||
const std::string& playerName = mCurrentSlot->mProfile.mPlayerName;
|
||||
if (!playerName.empty())
|
||||
text << playerName << "\n";
|
||||
const size_t profileIndex = mCharacterSelection->getIndexSelected();
|
||||
const std::string& slotPlayerName = mCurrentSlot->mProfile.mPlayerName;
|
||||
const std::string& profilePlayerName = *mCharacterSelection->getItemDataAt<std::string>(profileIndex);
|
||||
if (slotPlayerName != profilePlayerName)
|
||||
text << slotPlayerName << "\n";
|
||||
|
||||
text << "#{OMWEngine:Level} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue