mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
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/settings/settings.hpp>
|
||||
#include <components/vfs/manager.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
|
@ -29,8 +30,9 @@
|
|||
namespace MWGui
|
||||
{
|
||||
|
||||
MainMenu::MainMenu(int w, int h)
|
||||
MainMenu::MainMenu(int w, int h, const VFS::Manager* vfs)
|
||||
: Layout("openmw_mainmenu.layout")
|
||||
, mVFS(vfs)
|
||||
, mButtonBox(0), mWidth (w), mHeight (h)
|
||||
, mSaveGameDialog(NULL)
|
||||
, mBackground(NULL)
|
||||
|
@ -53,7 +55,7 @@ namespace MWGui
|
|||
std::string output = sstream.str();
|
||||
mVersionText->setCaption(output);
|
||||
|
||||
mHasAnimatedMenu = 0;//(Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup("video\\menu_background.bik"));
|
||||
mHasAnimatedMenu = mVFS->exists("video/menu_background.bik");
|
||||
|
||||
updateMenu();
|
||||
}
|
||||
|
@ -174,6 +176,7 @@ namespace MWGui
|
|||
|
||||
mVideo = mVideoBackground->createWidget<VideoWidget>("ImageBox", 0,0,1,1,
|
||||
MyGUI::Align::Stretch, "Menu");
|
||||
mVideo->setVFS(mVFS);
|
||||
|
||||
mVideo->playVideo("video\\menu_background.bik");
|
||||
}
|
||||
|
|
|
@ -8,6 +8,11 @@ namespace Gui
|
|||
class ImageButton;
|
||||
}
|
||||
|
||||
namespace VFS
|
||||
{
|
||||
class Manager;
|
||||
}
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
||||
|
@ -24,7 +29,7 @@ namespace MWGui
|
|||
|
||||
public:
|
||||
|
||||
MainMenu(int w, int h);
|
||||
MainMenu(int w, int h, const VFS::Manager* vfs);
|
||||
~MainMenu();
|
||||
|
||||
void onResChange(int w, int h);
|
||||
|
@ -34,6 +39,7 @@ namespace MWGui
|
|||
void update(float dt);
|
||||
|
||||
private:
|
||||
const VFS::Manager* mVFS;
|
||||
|
||||
MyGUI::Widget* mButtonBox;
|
||||
MyGUI::TextBox* mVersionText;
|
||||
|
|
|
@ -259,7 +259,7 @@ namespace MWGui
|
|||
mDragAndDrop = new DragAndDrop();
|
||||
|
||||
mRecharge = new Recharge();
|
||||
mMenu = new MainMenu(w,h);
|
||||
mMenu = new MainMenu(w, h, mResourceSystem->getVFS());
|
||||
mMap = new MapWindow(mCustomMarkers, mDragAndDrop, "");
|
||||
trackWindow(mMap, "map");
|
||||
mStatsWindow = new StatsWindow(mDragAndDrop);
|
||||
|
|
Loading…
Reference in a new issue