mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-31 19:18:27 +00:00
Merge branch 'FixSpellviewNavigationInQuickkeys' into 'master'
Fix quick-keys' spell list's D-pad / controller navigation Closes #8902 See merge request OpenMW/openmw!5080
This commit is contained in:
commit
2a337a34f0
2 changed files with 12 additions and 2 deletions
|
|
@ -228,6 +228,7 @@ namespace MWGui
|
|||
mMagicSelectionDialog = std::make_unique<MagicSelectionDialog>(this);
|
||||
}
|
||||
mMagicSelectionDialog->setVisible(true);
|
||||
mMagicSelectionDialog->setActiveControllerWindow(true);
|
||||
|
||||
mAssignDialog->setVisible(false);
|
||||
}
|
||||
|
|
@ -724,7 +725,6 @@ namespace MWGui
|
|||
WindowModal::onOpen();
|
||||
|
||||
mMagicList->setModel(new SpellModel(MWMechanics::getPlayer()));
|
||||
mMagicList->resetScrollbars();
|
||||
}
|
||||
|
||||
void MagicSelectionDialog::onModelIndexSelected(SpellModel::ModelIndex index)
|
||||
|
|
@ -745,4 +745,13 @@ namespace MWGui
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MagicSelectionDialog::setActiveControllerWindow(bool active)
|
||||
{
|
||||
if (!Settings::gui().mControllerMenus)
|
||||
return;
|
||||
|
||||
mMagicList->setActiveControllerWindow(active);
|
||||
WindowBase::setActiveControllerWindow(active);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ namespace MWGui
|
|||
void onOpen() override;
|
||||
bool exit() override;
|
||||
|
||||
void setActiveControllerWindow(bool active) override;
|
||||
|
||||
private:
|
||||
MyGUI::Button* mCancelButton;
|
||||
SpellView* mMagicList;
|
||||
|
|
@ -117,7 +119,6 @@ namespace MWGui
|
|||
void onModelIndexSelected(SpellModel::ModelIndex index);
|
||||
|
||||
bool onControllerButtonEvent(const SDL_ControllerButtonEvent& arg) override;
|
||||
size_t mControllerFocus = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue