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");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
||||||
|
okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));
|
||||||
|
|
||||||
updateBirths();
|
updateBirths();
|
||||||
updateSpells();
|
updateSpells();
|
||||||
|
@ -82,6 +83,9 @@ void BirthDialog::setBirthId(const std::string &birthId)
|
||||||
if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId))
|
if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId))
|
||||||
{
|
{
|
||||||
mBirthList->setIndexSelected(i);
|
mBirthList->setIndexSelected(i);
|
||||||
|
MyGUI::ButtonPtr okButton;
|
||||||
|
getWidget(okButton, "OKButton");
|
||||||
|
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,6 +112,10 @@ void BirthDialog::onSelectBirth(MyGUI::ListBox* _sender, size_t _index)
|
||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
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);
|
const std::string *birthId = mBirthList->getItemDataAt<std::string>(_index);
|
||||||
if (boost::iequals(mCurrentBirthId, *birthId))
|
if (boost::iequals(mCurrentBirthId, *birthId))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -104,6 +104,7 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked);
|
||||||
|
okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));
|
||||||
|
|
||||||
updateClasses();
|
updateClasses();
|
||||||
updateStats();
|
updateStats();
|
||||||
|
@ -137,6 +138,9 @@ void PickClassDialog::setClassId(const std::string &classId)
|
||||||
if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId))
|
if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId))
|
||||||
{
|
{
|
||||||
mClassList->setIndexSelected(i);
|
mClassList->setIndexSelected(i);
|
||||||
|
MyGUI::ButtonPtr okButton;
|
||||||
|
getWidget(okButton, "OKButton");
|
||||||
|
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,6 +167,10 @@ void PickClassDialog::onSelectClass(MyGUI::ListBox* _sender, size_t _index)
|
||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
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);
|
const std::string *classId = mClassList->getItemDataAt<std::string>(_index);
|
||||||
if (boost::iequals(mCurrentClassId, *classId))
|
if (boost::iequals(mCurrentClassId, *classId))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -80,6 +80,7 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
||||||
|
okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));
|
||||||
|
|
||||||
updateRaces();
|
updateRaces();
|
||||||
updateSkills();
|
updateSkills();
|
||||||
|
@ -121,6 +122,9 @@ void RaceDialog::setRaceId(const std::string &raceId)
|
||||||
if (boost::iequals(*mRaceList->getItemDataAt<std::string>(i), raceId))
|
if (boost::iequals(*mRaceList->getItemDataAt<std::string>(i), raceId))
|
||||||
{
|
{
|
||||||
mRaceList->setIndexSelected(i);
|
mRaceList->setIndexSelected(i);
|
||||||
|
MyGUI::ButtonPtr okButton;
|
||||||
|
getWidget(okButton, "OKButton");
|
||||||
|
okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,6 +206,9 @@ void RaceDialog::onSelectRace(MyGUI::ListBox* _sender, size_t _index)
|
||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
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);
|
const std::string *raceId = mRaceList->getItemDataAt<std::string>(_index);
|
||||||
if (boost::iequals(mCurrentRaceId, *raceId))
|
if (boost::iequals(mCurrentRaceId, *raceId))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue