forked from mirror/openmw-tes3mp
Main menu background videos
This commit is contained in:
parent
dc9b27acfe
commit
d772da3720
3 changed files with 13 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include <components/widgets/imagebutton.hpp>
|
#include <components/widgets/imagebutton.hpp>
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
#include <components/vfs/manager.hpp>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
@ -29,8 +30,9 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
MainMenu::MainMenu(int w, int h)
|
MainMenu::MainMenu(int w, int h, const VFS::Manager* vfs)
|
||||||
: Layout("openmw_mainmenu.layout")
|
: Layout("openmw_mainmenu.layout")
|
||||||
|
, mVFS(vfs)
|
||||||
, mButtonBox(0), mWidth (w), mHeight (h)
|
, mButtonBox(0), mWidth (w), mHeight (h)
|
||||||
, mSaveGameDialog(NULL)
|
, mSaveGameDialog(NULL)
|
||||||
, mBackground(NULL)
|
, mBackground(NULL)
|
||||||
|
@ -53,7 +55,7 @@ namespace MWGui
|
||||||
std::string output = sstream.str();
|
std::string output = sstream.str();
|
||||||
mVersionText->setCaption(output);
|
mVersionText->setCaption(output);
|
||||||
|
|
||||||
mHasAnimatedMenu = 0;//(Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup("video\\menu_background.bik"));
|
mHasAnimatedMenu = mVFS->exists("video/menu_background.bik");
|
||||||
|
|
||||||
updateMenu();
|
updateMenu();
|
||||||
}
|
}
|
||||||
|
@ -174,6 +176,7 @@ namespace MWGui
|
||||||
|
|
||||||
mVideo = mVideoBackground->createWidget<VideoWidget>("ImageBox", 0,0,1,1,
|
mVideo = mVideoBackground->createWidget<VideoWidget>("ImageBox", 0,0,1,1,
|
||||||
MyGUI::Align::Stretch, "Menu");
|
MyGUI::Align::Stretch, "Menu");
|
||||||
|
mVideo->setVFS(mVFS);
|
||||||
|
|
||||||
mVideo->playVideo("video\\menu_background.bik");
|
mVideo->playVideo("video\\menu_background.bik");
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,11 @@ namespace Gui
|
||||||
class ImageButton;
|
class ImageButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace VFS
|
||||||
|
{
|
||||||
|
class Manager;
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,7 +29,7 @@ namespace MWGui
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MainMenu(int w, int h);
|
MainMenu(int w, int h, const VFS::Manager* vfs);
|
||||||
~MainMenu();
|
~MainMenu();
|
||||||
|
|
||||||
void onResChange(int w, int h);
|
void onResChange(int w, int h);
|
||||||
|
@ -34,6 +39,7 @@ namespace MWGui
|
||||||
void update(float dt);
|
void update(float dt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
const VFS::Manager* mVFS;
|
||||||
|
|
||||||
MyGUI::Widget* mButtonBox;
|
MyGUI::Widget* mButtonBox;
|
||||||
MyGUI::TextBox* mVersionText;
|
MyGUI::TextBox* mVersionText;
|
||||||
|
|
|
@ -259,7 +259,7 @@ namespace MWGui
|
||||||
mDragAndDrop = new DragAndDrop();
|
mDragAndDrop = new DragAndDrop();
|
||||||
|
|
||||||
mRecharge = new Recharge();
|
mRecharge = new Recharge();
|
||||||
mMenu = new MainMenu(w,h);
|
mMenu = new MainMenu(w, h, mResourceSystem->getVFS());
|
||||||
mMap = new MapWindow(mCustomMarkers, mDragAndDrop, "");
|
mMap = new MapWindow(mCustomMarkers, mDragAndDrop, "");
|
||||||
trackWindow(mMap, "map");
|
trackWindow(mMap, "map");
|
||||||
mStatsWindow = new StatsWindow(mDragAndDrop);
|
mStatsWindow = new StatsWindow(mDragAndDrop);
|
||||||
|
|
Loading…
Reference in a new issue