mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-28 14: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 << " "
|
title << " (#{OMWEngine:Level} " << signature.mPlayerLevel << " "
|
||||||
<< MyGUI::TextIterator::toTagsString(MyGUI::UString(className)) << ")";
|
<< 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
|
if (mCurrentCharacter == &*it
|
||||||
|| (!mCurrentCharacter && !mSaving
|
|| (!mCurrentCharacter && !mSaving
|
||||||
|
|
@ -413,9 +414,11 @@ namespace MWGui
|
||||||
|
|
||||||
std::stringstream text;
|
std::stringstream text;
|
||||||
|
|
||||||
const std::string& playerName = mCurrentSlot->mProfile.mPlayerName;
|
const size_t profileIndex = mCharacterSelection->getIndexSelected();
|
||||||
if (!playerName.empty())
|
const std::string& slotPlayerName = mCurrentSlot->mProfile.mPlayerName;
|
||||||
text << playerName << "\n";
|
const std::string& profilePlayerName = *mCharacterSelection->getItemDataAt<std::string>(profileIndex);
|
||||||
|
if (slotPlayerName != profilePlayerName)
|
||||||
|
text << slotPlayerName << "\n";
|
||||||
|
|
||||||
text << "#{OMWEngine:Level} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
|
text << "#{OMWEngine:Level} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue