mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 16:15:33 +00:00
Fix focus for InputDialog
Created a special pipe for future GUI modes.
This commit is contained in:
parent
e81bf7318c
commit
4c2415e9db
4 changed files with 21 additions and 1 deletions
|
@ -48,7 +48,8 @@ namespace MWGui
|
|||
GM_LoadingWallpaper,
|
||||
GM_Jail,
|
||||
|
||||
GM_QuickKeysMenu
|
||||
GM_QuickKeysMenu,
|
||||
GM_TES3MPPipe
|
||||
};
|
||||
|
||||
// Windows shown in inventory mode
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <components/sdlutil/sdlcursormanager.hpp>
|
||||
|
||||
#include <components/misc/resourcehelpers.hpp>
|
||||
#include <apps/openmw/mwmp/Main.hpp>
|
||||
|
||||
#include "../mwbase/inputmanager.hpp"
|
||||
#include "../mwbase/statemanager.hpp"
|
||||
|
@ -676,6 +677,9 @@ namespace MWGui
|
|||
mToolTips->setVisible(false);
|
||||
setCursorVisible(mMessageBoxManager && mMessageBoxManager->isInteractiveMessageBox());
|
||||
break;
|
||||
case GM_TES3MPPipe:
|
||||
mwmp::Main::get().getGUIController()->WM_UpdateVisible(mode);
|
||||
break;
|
||||
default:
|
||||
// Unsupported mode, switch back to game
|
||||
break;
|
||||
|
|
|
@ -90,6 +90,7 @@ void mwmp::GUIController::ShowInputBox(const BasePlayer::GUIMessageBox &guiMessa
|
|||
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||
|
||||
windowManager->removeDialog(mInputBox);
|
||||
windowManager->pushGuiMode(MWGui::GM_TES3MPPipe);
|
||||
mInputBox = 0;
|
||||
mInputBox = new MWGui::TextInputDialog();
|
||||
mInputBox->setTextLabel(guiMessageBox.label);
|
||||
|
@ -108,6 +109,7 @@ void mwmp::GUIController::OnInputBoxDone(MWGui::WindowBase *parWindow)
|
|||
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(mInputBox);
|
||||
mInputBox = 0;
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
}
|
||||
|
||||
bool mwmp::GUIController::pressedKey(int key)
|
||||
|
@ -154,4 +156,15 @@ void mwmp::GUIController::update(float dt)
|
|||
|
||||
}
|
||||
|
||||
void mwmp::GUIController::WM_UpdateVisible(MWGui::GuiMode mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case MWGui::GM_TES3MPPipe:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <apps/openmw/mwgui/textinput.hpp>
|
||||
#include <apps/openmw/mwgui/mode.hpp>
|
||||
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
||||
#include "GUIChat.hpp"
|
||||
|
||||
|
@ -33,6 +34,7 @@ namespace mwmp
|
|||
|
||||
void update(float dt);
|
||||
|
||||
void WM_UpdateVisible(MWGui::GuiMode mode);
|
||||
private:
|
||||
GUIChat *mChat;
|
||||
int keySay;
|
||||
|
|
Loading…
Reference in a new issue