mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-25 02:26:42 +00:00
Update a comment
This commit is contained in:
parent
29f1c7c68f
commit
b0bdd68e7c
1 changed files with 6 additions and 4 deletions
|
|
@ -558,19 +558,21 @@ namespace MWGui
|
||||||
// When the filter list combo box is open, send all inputs to it.
|
// When the filter list combo box is open, send all inputs to it.
|
||||||
if (arg.button == SDL_CONTROLLER_BUTTON_A || arg.button == SDL_CONTROLLER_BUTTON_Y)
|
if (arg.button == SDL_CONTROLLER_BUTTON_A || arg.button == SDL_CONTROLLER_BUTTON_Y)
|
||||||
{
|
{
|
||||||
// Select the highlighted entry in the combo box and close it.
|
// Select the highlighted entry in the combo box and close it. List is closed by focusing on another
|
||||||
|
// widget.
|
||||||
size_t index = mFilterValue->getIndexSelected();
|
size_t index = mFilterValue->getIndexSelected();
|
||||||
mFilterValue->setIndexSelected(index);
|
mFilterValue->setIndexSelected(index);
|
||||||
onFilterChanged(mFilterValue, index);
|
onFilterChanged(mFilterValue, index);
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mNameEdit); // Close list
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mNameEdit);
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->playSound(ESM::RefId::stringRefId("Menu Click"));
|
MWBase::Environment::get().getWindowManager()->playSound(ESM::RefId::stringRefId("Menu Click"));
|
||||||
}
|
}
|
||||||
else if (arg.button == SDL_CONTROLLER_BUTTON_B)
|
else if (arg.button == SDL_CONTROLLER_BUTTON_B)
|
||||||
{
|
{
|
||||||
// Close the list without selecting anything
|
// Close the list without selecting anything. List is closed by focusing on another widget.
|
||||||
mFilterValue->clearIndexSelected();
|
mFilterValue->clearIndexSelected();
|
||||||
onFilterEdited(mFilterValue);
|
onFilterEdited(mFilterValue);
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mNameEdit); // Close list
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mNameEdit);
|
||||||
}
|
}
|
||||||
else if (arg.button == SDL_CONTROLLER_BUTTON_DPAD_UP)
|
else if (arg.button == SDL_CONTROLLER_BUTTON_DPAD_UP)
|
||||||
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::ArrowUp, 0, false);
|
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::ArrowUp, 0, false);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue