mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 22:45: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;
|
break;
|
||||||
case A_Activate:
|
case A_Activate:
|
||||||
resetIdleTime();
|
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) {
|
||||||
MWBase::Environment::get().getWindowManager()->enterPressed();
|
toggleContainer ();
|
||||||
}
|
} else if (MWBase::Environment::get().getWindowManager()->isGuiMode()) {
|
||||||
activate();
|
MWBase::Environment::get().getWindowManager()->enterPressed();
|
||||||
|
} else {
|
||||||
|
activate();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case A_Journal:
|
case A_Journal:
|
||||||
toggleJournal ();
|
toggleJournal ();
|
||||||
|
@ -674,6 +677,24 @@ namespace MWInput
|
||||||
// .. but don't touch any other mode, except container.
|
// .. 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()
|
void InputManager::toggleConsole()
|
||||||
{
|
{
|
||||||
if (MyGUI::InputManager::getInstance ().isModalAny())
|
if (MyGUI::InputManager::getInstance ().isModalAny())
|
||||||
|
|
|
@ -170,6 +170,7 @@ namespace MWInput
|
||||||
void toggleSpell();
|
void toggleSpell();
|
||||||
void toggleWeapon();
|
void toggleWeapon();
|
||||||
void toggleInventory();
|
void toggleInventory();
|
||||||
|
void toggleContainer();
|
||||||
void toggleConsole();
|
void toggleConsole();
|
||||||
void screenshot();
|
void screenshot();
|
||||||
void toggleJournal();
|
void toggleJournal();
|
||||||
|
|
Loading…
Reference in a new issue