forked from teamnwah/openmw-tes3coop
Fix a message box issue
This commit is contained in:
parent
b16c92c2f5
commit
4fd7891d2c
4 changed files with 4 additions and 23 deletions
|
@ -18,7 +18,6 @@ namespace MWGui
|
||||||
|
|
||||||
ToolTips::ToolTips() :
|
ToolTips::ToolTips() :
|
||||||
Layout("openmw_tooltips.layout")
|
Layout("openmw_tooltips.layout")
|
||||||
, mGameMode(true)
|
|
||||||
, mFullHelp(false)
|
, mFullHelp(false)
|
||||||
, mEnabled(true)
|
, mEnabled(true)
|
||||||
, mFocusToolTipX(0.0)
|
, mFocusToolTipX(0.0)
|
||||||
|
@ -73,7 +72,9 @@ namespace MWGui
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mGameMode)
|
bool gameMode = MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||||
|
|
||||||
|
if (gameMode)
|
||||||
{
|
{
|
||||||
const MyGUI::IntPoint& mousePos = MyGUI::InputManager::getInstance().getMousePosition();
|
const MyGUI::IntPoint& mousePos = MyGUI::InputManager::getInstance().getMousePosition();
|
||||||
|
|
||||||
|
@ -297,16 +298,6 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolTips::enterGameMode()
|
|
||||||
{
|
|
||||||
mGameMode = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolTips::enterGuiMode()
|
|
||||||
{
|
|
||||||
mGameMode = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolTips::setFocusObject(const MWWorld::Ptr& focus)
|
void ToolTips::setFocusObject(const MWWorld::Ptr& focus)
|
||||||
{
|
{
|
||||||
mFocusObject = focus;
|
mFocusObject = focus;
|
||||||
|
|
|
@ -43,9 +43,6 @@ namespace MWGui
|
||||||
|
|
||||||
void onFrame(float frameDuration);
|
void onFrame(float frameDuration);
|
||||||
|
|
||||||
void enterGameMode();
|
|
||||||
void enterGuiMode();
|
|
||||||
|
|
||||||
void setEnabled(bool enabled);
|
void setEnabled(bool enabled);
|
||||||
|
|
||||||
void toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
|
void toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
|
||||||
|
@ -104,8 +101,6 @@ namespace MWGui
|
||||||
int mLastMouseX;
|
int mLastMouseX;
|
||||||
int mLastMouseY;
|
int mLastMouseY;
|
||||||
|
|
||||||
bool mGameMode;
|
|
||||||
|
|
||||||
bool mEnabled;
|
bool mEnabled;
|
||||||
|
|
||||||
bool mFullHelp;
|
bool mFullHelp;
|
||||||
|
|
|
@ -356,11 +356,6 @@ namespace MWGui
|
||||||
mInputBlocker->setVisible (gameMode);
|
mInputBlocker->setVisible (gameMode);
|
||||||
setCursorVisible(!gameMode);
|
setCursorVisible(!gameMode);
|
||||||
|
|
||||||
if (gameMode)
|
|
||||||
mToolTips->enterGameMode();
|
|
||||||
else
|
|
||||||
mToolTips->enterGuiMode();
|
|
||||||
|
|
||||||
if (gameMode)
|
if (gameMode)
|
||||||
setKeyFocusWidget (NULL);
|
setKeyFocusWidget (NULL);
|
||||||
|
|
||||||
|
|
|
@ -408,6 +408,7 @@ namespace MWInput
|
||||||
mMouseLookEnabled = !guiMode;
|
mMouseLookEnabled = !guiMode;
|
||||||
if (guiMode)
|
if (guiMode)
|
||||||
mWindows.showCrosshair(false);
|
mWindows.showCrosshair(false);
|
||||||
|
mWindows.setCursorVisible(guiMode);
|
||||||
// if not in gui mode, the camera decides whether to show crosshair or not.
|
// if not in gui mode, the camera decides whether to show crosshair or not.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,7 +471,6 @@ namespace MWInput
|
||||||
bool InputManager::keyPressed( const SDL_KeyboardEvent &arg )
|
bool InputManager::keyPressed( const SDL_KeyboardEvent &arg )
|
||||||
{
|
{
|
||||||
mInputBinder->keyPressed (arg);
|
mInputBinder->keyPressed (arg);
|
||||||
unsigned int text = arg.keysym.unicode;
|
|
||||||
|
|
||||||
if(arg.keysym.sym == SDLK_RETURN
|
if(arg.keysym.sym == SDLK_RETURN
|
||||||
&& MWBase::Environment::get().getWindowManager()->isGuiMode())
|
&& MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||||
|
|
Loading…
Reference in a new issue