forked from teamnwah/openmw-tes3coop
fix reentering race selection
This commit is contained in:
parent
0d33d005a5
commit
623e00531d
1 changed files with 9 additions and 2 deletions
|
@ -109,8 +109,15 @@ void RaceDialog::open()
|
||||||
MWBase::Environment::get().getWorld ()->setupExternalRendering (*mPreview);
|
MWBase::Environment::get().getWorld ()->setupExternalRendering (*mPreview);
|
||||||
mPreview->update (0);
|
mPreview->update (0);
|
||||||
|
|
||||||
setRaceId(mPreview->getPrototype().mRace);
|
const ESM::NPC proto = mPreview->getPrototype();
|
||||||
|
setRaceId(proto.mRace);
|
||||||
recountParts();
|
recountParts();
|
||||||
|
|
||||||
|
std::string index = proto.mHead.substr(proto.mHead.size() - 2, 2);
|
||||||
|
mFaceIndex = boost::lexical_cast<int>(index) - 1;
|
||||||
|
|
||||||
|
index = proto.mHair.substr(proto.mHair.size() - 2, 2);
|
||||||
|
mHairIndex = boost::lexical_cast<int>(index) - 1;
|
||||||
|
|
||||||
mPreviewImage->setImageTexture ("CharacterHeadPreview");
|
mPreviewImage->setImageTexture ("CharacterHeadPreview");
|
||||||
}
|
}
|
||||||
|
@ -240,7 +247,7 @@ void RaceDialog::onSelectPreviousHair(MyGUI::Widget*)
|
||||||
|
|
||||||
void RaceDialog::onSelectNextHair(MyGUI::Widget*)
|
void RaceDialog::onSelectNextHair(MyGUI::Widget*)
|
||||||
{
|
{
|
||||||
mHairIndex = wrap(mHairIndex - 1, mHairCount);
|
mHairIndex = wrap(mHairIndex + 1, mHairCount);
|
||||||
updatePreview();
|
updatePreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue