|
|
@ -3,9 +3,7 @@
|
|
|
|
#include <cassert>
|
|
|
|
#include <cassert>
|
|
|
|
#include <iterator>
|
|
|
|
#include <iterator>
|
|
|
|
|
|
|
|
|
|
|
|
#include <OgreTextureManager.h>
|
|
|
|
#include <osgViewer/Viewer>
|
|
|
|
#include <OgreRenderWindow.h>
|
|
|
|
|
|
|
|
#include <OgreSceneManager.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <MyGUI_UString.h>
|
|
|
|
#include <MyGUI_UString.h>
|
|
|
|
#include <MyGUI_IPointer.h>
|
|
|
|
#include <MyGUI_IPointer.h>
|
|
|
@ -38,6 +36,8 @@
|
|
|
|
#include "../mwbase/inputmanager.hpp"
|
|
|
|
#include "../mwbase/inputmanager.hpp"
|
|
|
|
#include "../mwbase/statemanager.hpp"
|
|
|
|
#include "../mwbase/statemanager.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwrender/vismask.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwworld/class.hpp"
|
|
|
|
#include "../mwworld/class.hpp"
|
|
|
|
#include "../mwworld/player.hpp"
|
|
|
|
#include "../mwworld/player.hpp"
|
|
|
|
#include "../mwworld/cellstore.hpp"
|
|
|
|
#include "../mwworld/cellstore.hpp"
|
|
|
@ -102,7 +102,8 @@ namespace MWGui
|
|
|
|
osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem
|
|
|
|
osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem
|
|
|
|
, const std::string& logpath, const std::string& resourcePath, bool consoleOnlyScripts,
|
|
|
|
, const std::string& logpath, const std::string& resourcePath, bool consoleOnlyScripts,
|
|
|
|
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string, std::string>& fallbackMap)
|
|
|
|
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string, std::string>& fallbackMap)
|
|
|
|
: mConsoleOnlyScripts(consoleOnlyScripts)
|
|
|
|
: mViewer(viewer)
|
|
|
|
|
|
|
|
, mConsoleOnlyScripts(consoleOnlyScripts)
|
|
|
|
, mHud(NULL)
|
|
|
|
, mHud(NULL)
|
|
|
|
, mMap(NULL)
|
|
|
|
, mMap(NULL)
|
|
|
|
, mMenu(NULL)
|
|
|
|
, mMenu(NULL)
|
|
|
@ -236,6 +237,7 @@ namespace MWGui
|
|
|
|
mVideoWidget = mVideoBackground->createWidgetReal<VideoWidget>("ImageBox", 0,0,1,1, MyGUI::Align::Default);
|
|
|
|
mVideoWidget = mVideoBackground->createWidgetReal<VideoWidget>("ImageBox", 0,0,1,1, MyGUI::Align::Default);
|
|
|
|
mVideoWidget->setNeedMouseFocus(true);
|
|
|
|
mVideoWidget->setNeedMouseFocus(true);
|
|
|
|
mVideoWidget->setNeedKeyFocus(true);
|
|
|
|
mVideoWidget->setNeedKeyFocus(true);
|
|
|
|
|
|
|
|
mVideoWidget->setVFS(resourceSystem->getVFS());
|
|
|
|
|
|
|
|
|
|
|
|
// Removes default MyGUI system clipboard implementation, which supports windows only
|
|
|
|
// Removes default MyGUI system clipboard implementation, which supports windows only
|
|
|
|
MyGUI::ClipboardManager::getInstance().eventClipboardChanged.clear();
|
|
|
|
MyGUI::ClipboardManager::getInstance().eventClipboardChanged.clear();
|
|
|
@ -1127,8 +1129,8 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
mGuiModes.push_back(mode);
|
|
|
|
mGuiModes.push_back(mode);
|
|
|
|
|
|
|
|
|
|
|
|
bool gameMode = !isGuiMode();
|
|
|
|
//bool gameMode = !isGuiMode();
|
|
|
|
MWBase::Environment::get().getInputManager()->changeInputMode(!gameMode);
|
|
|
|
//MWBase::Environment::get().getInputManager()->changeInputMode(!gameMode);
|
|
|
|
|
|
|
|
|
|
|
|
updateVisible();
|
|
|
|
updateVisible();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1683,7 +1685,6 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
void WindowManager::playVideo(const std::string &name, bool allowSkipping)
|
|
|
|
void WindowManager::playVideo(const std::string &name, bool allowSkipping)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
|
|
|
|
mVideoWidget->playVideo("video\\" + name);
|
|
|
|
mVideoWidget->playVideo("video\\" + name);
|
|
|
|
|
|
|
|
|
|
|
|
mVideoWidget->eventKeyButtonPressed.clear();
|
|
|
|
mVideoWidget->eventKeyButtonPressed.clear();
|
|
|
@ -1695,16 +1696,10 @@ namespace MWGui
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Turn off all rendering except for the GUI
|
|
|
|
// Turn off all rendering except for the GUI
|
|
|
|
/*
|
|
|
|
int oldUpdateMask = mViewer->getUpdateVisitor()->getTraversalMask();
|
|
|
|
mRendering->getScene()->clearSpecialCaseRenderQueues();
|
|
|
|
int oldCullMask = mViewer->getCamera()->getCullMask();
|
|
|
|
// SCRQM_INCLUDE with RENDER_QUEUE_OVERLAY does not work?
|
|
|
|
mViewer->getUpdateVisitor()->setTraversalMask(MWRender::Mask_GUI);
|
|
|
|
for(int i = 0;i < Ogre::RENDER_QUEUE_MAX;++i)
|
|
|
|
mViewer->getCamera()->setCullMask(MWRender::Mask_GUI);
|
|
|
|
{
|
|
|
|
|
|
|
|
if(i > 0 && i < 96)
|
|
|
|
|
|
|
|
mRendering->getScene()->addSpecialCaseRenderQueue(i);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mRendering->getScene()->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MyGUI::IntSize screenSize = MyGUI::RenderManager::getInstance().getViewSize();
|
|
|
|
MyGUI::IntSize screenSize = MyGUI::RenderManager::getInstance().getViewSize();
|
|
|
|
sizeVideo(screenSize.width, screenSize.height);
|
|
|
|
sizeVideo(screenSize.width, screenSize.height);
|
|
|
@ -1722,9 +1717,9 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
while (mVideoWidget->update() && !MWBase::Environment::get().getStateManager()->hasQuitRequest())
|
|
|
|
while (mVideoWidget->update() && !MWBase::Environment::get().getStateManager()->hasQuitRequest())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getInputManager()->update(0, true, false);
|
|
|
|
//MWBase::Environment::get().getInputManager()->update(0, true, false);
|
|
|
|
|
|
|
|
|
|
|
|
//mRendering->getWindow()->update();
|
|
|
|
mViewer->frame();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mVideoWidget->stop();
|
|
|
|
mVideoWidget->stop();
|
|
|
|
|
|
|
|
|
|
|
@ -1733,8 +1728,8 @@ namespace MWGui
|
|
|
|
setCursorVisible(cursorWasVisible);
|
|
|
|
setCursorVisible(cursorWasVisible);
|
|
|
|
|
|
|
|
|
|
|
|
// Restore normal rendering
|
|
|
|
// Restore normal rendering
|
|
|
|
//mRendering->getScene()->clearSpecialCaseRenderQueues();
|
|
|
|
mViewer->getUpdateVisitor()->setTraversalMask(oldUpdateMask);
|
|
|
|
//mRendering->getScene()->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
|
|
|
|
mViewer->getCamera()->setCullMask(oldCullMask);
|
|
|
|
|
|
|
|
|
|
|
|
mVideoBackground->setVisible(false);
|
|
|
|
mVideoBackground->setVisible(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|