forked from teamnwah/openmw-tes3coop
Fixed: character creation: make OK button grayed out/disabled (loses the hoverover when it's re-enabled though...)
This commit is contained in:
parent
1c8e941f0d
commit
b70b8cc4bc
3 changed files with 23 additions and 0 deletions
|
@ -48,6 +48,7 @@ BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
|
|||
getWidget(okButton, "OKButton");
|
||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
||||
okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));
|
||||
|
||||
updateBirths();
|
||||
updateSpells();
|
||||
|
@ -82,6 +83,9 @@ void BirthDialog::setBirthId(const std::string &birthId)
|
|||
if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId))
|
||||
{
|
||||
mBirthList->setIndexSelected(i);
|
||||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +112,10 @@ void BirthDialog::onSelectBirth(MyGUI::ListBox* _sender, size_t _index)
|
|||
if (_index == MyGUI::ITEM_NONE)
|
||||
return;
|
||||
|
||||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||
|
||||
const std::string *birthId = mBirthList->getItemDataAt<std::string>(_index);
|
||||
if (boost::iequals(mCurrentBirthId, *birthId))
|
||||
return;
|
||||
|
|
|
@ -104,6 +104,7 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
|
|||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked);
|
||||
okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));
|
||||
|
||||
updateClasses();
|
||||
updateStats();
|
||||
|
@ -137,6 +138,9 @@ void PickClassDialog::setClassId(const std::string &classId)
|
|||
if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId))
|
||||
{
|
||||
mClassList->setIndexSelected(i);
|
||||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -163,6 +167,10 @@ void PickClassDialog::onSelectClass(MyGUI::ListBox* _sender, size_t _index)
|
|||
if (_index == MyGUI::ITEM_NONE)
|
||||
return;
|
||||
|
||||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||
|
||||
const std::string *classId = mClassList->getItemDataAt<std::string>(_index);
|
||||
if (boost::iequals(mCurrentClassId, *classId))
|
||||
return;
|
||||
|
|
|
@ -80,6 +80,7 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
|||
getWidget(okButton, "OKButton");
|
||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
||||
okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));
|
||||
|
||||
updateRaces();
|
||||
updateSkills();
|
||||
|
@ -121,6 +122,9 @@ void RaceDialog::setRaceId(const std::string &raceId)
|
|||
if (boost::iequals(*mRaceList->getItemDataAt<std::string>(i), raceId))
|
||||
{
|
||||
mRaceList->setIndexSelected(i);
|
||||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +206,9 @@ void RaceDialog::onSelectRace(MyGUI::ListBox* _sender, size_t _index)
|
|||
if (_index == MyGUI::ITEM_NONE)
|
||||
return;
|
||||
|
||||
MyGUI::ButtonPtr okButton;
|
||||
getWidget(okButton, "OKButton");
|
||||
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||
const std::string *raceId = mRaceList->getItemDataAt<std::string>(_index);
|
||||
if (boost::iequals(mCurrentRaceId, *raceId))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue