Adjust some more windows to be keyboard friendlier

pull/303/head
scrawl 7 years ago
parent 4fff2e2e34
commit be19f51013

@ -69,6 +69,7 @@ namespace MWGui
WindowModal::onOpen();
updateBirths();
updateSpells();
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mBirthList);
}

@ -130,6 +130,7 @@ namespace MWGui
WindowModal::onOpen ();
updateClasses();
updateStats();
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mClassList);
}

@ -526,7 +526,10 @@ namespace MWGui
}
bool goodbyeEnabled = !MWBase::Environment::get().getDialogueManager()->isInChoice() || mGoodbye;
bool goodbyeWasEnabled = mGoodbyeButton->getEnabled();
mGoodbyeButton->setEnabled(goodbyeEnabled);
if (goodbyeEnabled && !goodbyeWasEnabled)
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mGoodbyeButton);
bool topicsEnabled = !MWBase::Environment::get().getDialogueManager()->isInChoice() && !mGoodbye;
mTopicsList->setEnabled(topicsEnabled);

@ -163,6 +163,8 @@ namespace MWGui
size_t initialPos = mHeadRotate->getScrollRange()/2+mHeadRotate->getScrollRange()/10;
mHeadRotate->setScrollPosition(initialPos);
onHeadRotate(mHeadRotate, initialPos);
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mRaceList);
}
void RaceDialog::setRaceId(const std::string &raceId)

@ -419,6 +419,7 @@ namespace MWGui
void SpellCreationDialog::onOpen()
{
center();
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mNameEdit);
}
void SpellCreationDialog::onReferenceUnavailable ()

@ -106,6 +106,7 @@ namespace MWGui
Gui::SharedStateButton* t = mScrollView->createWidget<Gui::SharedStateButton>(skin,
MyGUI::IntCoord(0, 0, 0, spellHeight), MyGUI::Align::Left | MyGUI::Align::Top);
t->setNeedKeyFocus(true);
t->setCaption(spell.mName);
t->setTextAlign(MyGUI::Align::Left);
adjustSpellWidget(spell, i, t);

@ -32,18 +32,23 @@
<Widget type="HBox" position="0 8 350 24" align="Left Top HStretch" name="Categories">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 60 24" name="AllButton">
<Property key="Caption" value="#{sAllTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 60 24" name="WeaponButton">
<Property key="Caption" value="#{sWeaponTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 60 24" name="ApparelButton">
<Property key="Caption" value="#{sApparelTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 60 24" name="MagicButton">
<Property key="Caption" value="#{sMagicTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 60 24" name="MiscButton">
<Property key="Caption" value="#{sMiscTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
</Widget>

@ -9,18 +9,23 @@
<Widget type="HBox" position="8 8 566 24" align="Left Top HStretch" name="Categories">
<Widget type="AutoSizedButton" skin="MW_Button" name="AllButton">
<Property key="Caption" value="#{sAllTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="WeaponButton">
<Property key="Caption" value="#{sWeaponTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="ApparelButton">
<Property key="Caption" value="#{sApparelTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="MagicButton">
<Property key="Caption" value="#{sMagicTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="MiscButton">
<Property key="Caption" value="#{sMiscTab}"/>
<Property key="NeedKey" value="false"/>
</Widget>
</Widget>

Loading…
Cancel
Save