mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-08 21:46:43 +00:00
Some controller focus initialization cleanup
This commit is contained in:
parent
80a29ab57b
commit
30bd014bd7
3 changed files with 2 additions and 7 deletions
|
|
@ -383,7 +383,6 @@ namespace MWGui
|
||||||
|
|
||||||
InfoBoxDialog::InfoBoxDialog()
|
InfoBoxDialog::InfoBoxDialog()
|
||||||
: WindowModal("openmw_infobox.layout")
|
: WindowModal("openmw_infobox.layout")
|
||||||
, mControllerFocus(0)
|
|
||||||
{
|
{
|
||||||
getWidget(mTextBox, "TextBox");
|
getWidget(mTextBox, "TextBox");
|
||||||
getWidget(mText, "Text");
|
getWidget(mText, "Text");
|
||||||
|
|
@ -525,7 +524,6 @@ namespace MWGui
|
||||||
: WindowModal("openmw_chargen_create_class.layout")
|
: WindowModal("openmw_chargen_create_class.layout")
|
||||||
, mAffectedAttribute(nullptr)
|
, mAffectedAttribute(nullptr)
|
||||||
, mAffectedSkill(nullptr)
|
, mAffectedSkill(nullptr)
|
||||||
, mControllerFocus(2)
|
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
|
@ -962,7 +960,6 @@ namespace MWGui
|
||||||
|
|
||||||
if (Settings::gui().mControllerMenus)
|
if (Settings::gui().mControllerMenus)
|
||||||
{
|
{
|
||||||
mControllerFocus = 0;
|
|
||||||
if (mAttributeButtons.size() > 0)
|
if (mAttributeButtons.size() > 0)
|
||||||
mAttributeButtons[0]->setStateSelected(true);
|
mAttributeButtons[0]->setStateSelected(true);
|
||||||
|
|
||||||
|
|
@ -1021,9 +1018,7 @@ namespace MWGui
|
||||||
|
|
||||||
SelectSkillDialog::SelectSkillDialog()
|
SelectSkillDialog::SelectSkillDialog()
|
||||||
: WindowModal("openmw_chargen_select_skill.layout")
|
: WindowModal("openmw_chargen_select_skill.layout")
|
||||||
, mControllerFocus(0)
|
|
||||||
, mSkillId(ESM::Skill::Block)
|
, mSkillId(ESM::Skill::Block)
|
||||||
, mNumSkillsPerSpecialization{}
|
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ namespace MWGui
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ESM::RefId mSkillId;
|
ESM::RefId mSkillId;
|
||||||
std::array<size_t, 3> mNumSkillsPerSpecialization;
|
std::array<size_t, 3> mNumSkillsPerSpecialization{};
|
||||||
|
|
||||||
void selectNextColumn(int direction);
|
void selectNextColumn(int direction);
|
||||||
};
|
};
|
||||||
|
|
@ -353,7 +353,7 @@ namespace MWGui
|
||||||
Widgets::MWSkillPtr mAffectedSkill;
|
Widgets::MWSkillPtr mAffectedSkill;
|
||||||
|
|
||||||
bool onControllerButtonEvent(const SDL_ControllerButtonEvent& arg) override;
|
bool onControllerButtonEvent(const SDL_ControllerButtonEvent& arg) override;
|
||||||
size_t mControllerFocus = 0;
|
size_t mControllerFocus = 2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue