|
|
|
@ -57,6 +57,7 @@
|
|
|
|
|
#include "spellicons.hpp"
|
|
|
|
|
#include "merchantrepair.hpp"
|
|
|
|
|
#include "repair.hpp"
|
|
|
|
|
#include "soulgemdialog.hpp"
|
|
|
|
|
|
|
|
|
|
using namespace MWGui;
|
|
|
|
|
|
|
|
|
@ -94,6 +95,7 @@ WindowManager::WindowManager(
|
|
|
|
|
, mTrainingWindow(NULL)
|
|
|
|
|
, mMerchantRepair(NULL)
|
|
|
|
|
, mRepair(NULL)
|
|
|
|
|
, mSoulgemDialog(NULL)
|
|
|
|
|
, mPlayerName()
|
|
|
|
|
, mPlayerRaceId()
|
|
|
|
|
, mPlayerAttributes()
|
|
|
|
@ -186,6 +188,7 @@ WindowManager::WindowManager(
|
|
|
|
|
mTrainingWindow = new TrainingWindow(*this);
|
|
|
|
|
mMerchantRepair = new MerchantRepair(*this);
|
|
|
|
|
mRepair = new Repair(*this);
|
|
|
|
|
mSoulgemDialog = new SoulgemDialog(mMessageBoxManager);
|
|
|
|
|
|
|
|
|
|
mLoadingScreen = new LoadingScreen(mRendering->getScene (), mRendering->getWindow (), *this);
|
|
|
|
|
mLoadingScreen->onResChange (w,h);
|
|
|
|
@ -253,6 +256,7 @@ WindowManager::~WindowManager()
|
|
|
|
|
delete mQuickKeysMenu;
|
|
|
|
|
delete mMerchantRepair;
|
|
|
|
|
delete mRepair;
|
|
|
|
|
delete mSoulgemDialog;
|
|
|
|
|
delete mCursor;
|
|
|
|
|
|
|
|
|
|
cleanupGarbage();
|
|
|
|
@ -316,9 +320,6 @@ void WindowManager::updateVisible()
|
|
|
|
|
|
|
|
|
|
mHud->setVisible(mHudEnabled);
|
|
|
|
|
|
|
|
|
|
// Mouse is visible whenever we're not in game mode
|
|
|
|
|
mCursor->setVisible(isGuiMode());
|
|
|
|
|
|
|
|
|
|
bool gameMode = !isGuiMode();
|
|
|
|
|
|
|
|
|
|
mInputBlocker->setVisible (gameMode);
|
|
|
|
@ -444,8 +445,6 @@ void WindowManager::updateVisible()
|
|
|
|
|
case GM_Repair:
|
|
|
|
|
mRepair->setVisible(true);
|
|
|
|
|
break;
|
|
|
|
|
case GM_InterMessageBox:
|
|
|
|
|
break;
|
|
|
|
|
case GM_Journal:
|
|
|
|
|
mJournal->setVisible(true);
|
|
|
|
|
break;
|
|
|
|
@ -609,7 +608,7 @@ void WindowManager::messageBox (const std::string& message, const std::vector<st
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mMessageBoxManager->createInteractiveMessageBox(message, buttons);
|
|
|
|
|
pushGuiMode(GM_InterMessageBox);
|
|
|
|
|
MWBase::Environment::get().getInputManager()->changeInputMode(isGuiMode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -648,6 +647,7 @@ void WindowManager::onDialogueWindowBye()
|
|
|
|
|
void WindowManager::onFrame (float frameDuration)
|
|
|
|
|
{
|
|
|
|
|
mMessageBoxManager->onFrame(frameDuration);
|
|
|
|
|
|
|
|
|
|
mToolTips->onFrame(frameDuration);
|
|
|
|
|
|
|
|
|
|
if (mDragAndDrop->mIsOnDragAndDrop)
|
|
|
|
@ -1033,12 +1033,12 @@ void WindowManager::toggleVisible (GuiWindow wnd)
|
|
|
|
|
|
|
|
|
|
bool WindowManager::isGuiMode() const
|
|
|
|
|
{
|
|
|
|
|
return !mGuiModes.empty();
|
|
|
|
|
return !mGuiModes.empty() || mMessageBoxManager->isInteractiveMessageBox();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool WindowManager::isConsoleMode() const
|
|
|
|
|
{
|
|
|
|
|
if (mGuiModes.back()==GM_Console)
|
|
|
|
|
if (!mGuiModes.empty() && mGuiModes.back()==GM_Console)
|
|
|
|
|
return true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -1046,8 +1046,7 @@ bool WindowManager::isConsoleMode() const
|
|
|
|
|
MWGui::GuiMode WindowManager::getMode() const
|
|
|
|
|
{
|
|
|
|
|
if (mGuiModes.empty())
|
|
|
|
|
throw std::runtime_error ("getMode() called, but there is no active mode");
|
|
|
|
|
|
|
|
|
|
return GM_None;
|
|
|
|
|
return mGuiModes.back();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1143,6 +1142,11 @@ void WindowManager::startEnchanting (MWWorld::Ptr actor)
|
|
|
|
|
mEnchantingDialog->startEnchanting (actor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowManager::startSelfEnchanting(MWWorld::Ptr soulgem)
|
|
|
|
|
{
|
|
|
|
|
mEnchantingDialog->startSelfEnchanting(soulgem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowManager::startTraining(MWWorld::Ptr actor)
|
|
|
|
|
{
|
|
|
|
|
mTrainingWindow->startTraining(actor);
|
|
|
|
@ -1167,3 +1171,8 @@ void WindowManager::changePointer(const std::string &name)
|
|
|
|
|
{
|
|
|
|
|
mCursor->onCursorChange(name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowManager::showSoulgemDialog(MWWorld::Ptr item)
|
|
|
|
|
{
|
|
|
|
|
mSoulgemDialog->show(item);
|
|
|
|
|
}
|
|
|
|
|