mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 22:15:33 +00:00
Merge remote-tracking branch 'vorenon/container'
This commit is contained in:
commit
fd9cc1c282
2 changed files with 27 additions and 5 deletions
|
@ -182,11 +182,14 @@ namespace MWInput
|
|||
break;
|
||||
case A_Activate:
|
||||
resetIdleTime();
|
||||
if( MWBase::Environment::get().getWindowManager()->isGuiMode()) {
|
||||
// Pressing the activation key when a messagebox is prompting for "ok" will activate the ok button
|
||||
|
||||
if (mWindows.getMode() == MWGui::GM_Container) {
|
||||
toggleContainer ();
|
||||
} else if (MWBase::Environment::get().getWindowManager()->isGuiMode()) {
|
||||
MWBase::Environment::get().getWindowManager()->enterPressed();
|
||||
}
|
||||
} else {
|
||||
activate();
|
||||
}
|
||||
break;
|
||||
case A_Journal:
|
||||
toggleJournal ();
|
||||
|
@ -674,6 +677,24 @@ namespace MWInput
|
|||
// .. but don't touch any other mode, except container.
|
||||
}
|
||||
|
||||
void InputManager::toggleContainer()
|
||||
{
|
||||
if (MyGUI::InputManager::getInstance ().isModalAny())
|
||||
return;
|
||||
|
||||
bool gameMode = !mWindows.isGuiMode();
|
||||
|
||||
if(!gameMode)
|
||||
{
|
||||
if (mWindows.getMode() == MWGui::GM_Container)
|
||||
mWindows.popGuiMode();
|
||||
else
|
||||
mWindows.pushGuiMode(MWGui::GM_Container);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InputManager::toggleConsole()
|
||||
{
|
||||
if (MyGUI::InputManager::getInstance ().isModalAny())
|
||||
|
|
|
@ -170,6 +170,7 @@ namespace MWInput
|
|||
void toggleSpell();
|
||||
void toggleWeapon();
|
||||
void toggleInventory();
|
||||
void toggleContainer();
|
||||
void toggleConsole();
|
||||
void screenshot();
|
||||
void toggleJournal();
|
||||
|
|
Loading…
Reference in a new issue