mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-08 15:34:32 +00:00
Allow exiting credits by pressing B
This commit is contained in:
parent
b4e0590a10
commit
fc86878922
2 changed files with 12 additions and 4 deletions
|
|
@ -228,9 +228,15 @@ namespace MWGui
|
||||||
break;
|
break;
|
||||||
case SDL_CONTROLLER_BUTTON_B:
|
case SDL_CONTROLLER_BUTTON_B:
|
||||||
case SDL_CONTROLLER_BUTTON_START:
|
case SDL_CONTROLLER_BUTTON_START:
|
||||||
|
if (mButtons["return"]->getVisible())
|
||||||
|
{
|
||||||
onButtonClicked(mButtons["return"]);
|
onButtonClicked(mButtons["return"]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
key = MyGUI::KeyCode::Escape;
|
||||||
|
break;
|
||||||
|
}
|
||||||
MWBase::Environment::get().getWindowManager()->injectKeyPress(key, 0, false);
|
MWBase::Environment::get().getWindowManager()->injectKeyPress(key, 0, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,8 @@ namespace MWInput
|
||||||
if (Settings::gui().mControllerMenus)
|
if (Settings::gui().mControllerMenus)
|
||||||
{
|
{
|
||||||
MWGui::WindowBase* topWin = MWBase::Environment::get().getWindowManager()->getTopWindow();
|
MWGui::WindowBase* topWin = MWBase::Environment::get().getWindowManager()->getTopWindow();
|
||||||
return topWin && topWin->onControllerButtonEvent(arg);
|
if (topWin && topWin->onControllerButtonEvent(arg))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Presumption of GUI mode will be removed in the future.
|
// Presumption of GUI mode will be removed in the future.
|
||||||
|
|
@ -311,7 +312,8 @@ namespace MWInput
|
||||||
if (Settings::gui().mControllerMenus)
|
if (Settings::gui().mControllerMenus)
|
||||||
{
|
{
|
||||||
MWGui::WindowBase* topWin = MWBase::Environment::get().getWindowManager()->getTopWindow();
|
MWGui::WindowBase* topWin = MWBase::Environment::get().getWindowManager()->getTopWindow();
|
||||||
return topWin && topWin->onControllerThumbstickEvent(arg);
|
if (topWin && topWin->onControllerThumbstickEvent(arg))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (arg.axis)
|
switch (arg.axis)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue