1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 05:19:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/loadingscreen.hpp

74 lines
1.6 KiB
C++
Raw Normal View History

2012-09-11 14:37:54 +00:00
#ifndef MWGUI_LOADINGSCREEN_H
#define MWGUI_LOADINGSCREEN_H
#include <OgreTimer.h>
2015-01-10 02:56:06 +00:00
#include <OgreStringVector.h>
2012-09-11 14:37:54 +00:00
#include "windowbase.hpp"
2012-09-11 14:37:54 +00:00
#include <components/loadinglistener/loadinglistener.hpp>
2015-01-10 02:56:06 +00:00
namespace Ogre
{
class SceneManager;
}
2012-09-11 14:37:54 +00:00
namespace MWGui
{
class BackgroundImage;
class LoadingScreen : public WindowBase, public Loading::Listener
2012-09-11 14:37:54 +00:00
{
public:
virtual void setLabel (const std::string& label);
/// Indicate that some progress has been made, without specifying how much
virtual void indicateProgress ();
virtual void loadingOn();
virtual void loadingOff();
virtual void setProgressRange (size_t range);
virtual void setProgress (size_t value);
virtual void increaseProgress (size_t increase=1);
virtual void setVisible(bool visible);
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw);
2012-09-11 14:37:54 +00:00
virtual ~LoadingScreen();
void setLoadingProgress (const std::string& stage, int depth, int current, int total);
2012-09-12 22:21:58 +00:00
void loadingDone();
2012-09-11 14:37:54 +00:00
2013-02-05 19:48:25 +00:00
void updateWindow(Ogre::RenderWindow* rw) { mWindow = rw; }
2012-09-11 14:37:54 +00:00
private:
Ogre::SceneManager* mSceneMgr;
Ogre::RenderWindow* mWindow;
2012-09-13 10:33:09 +00:00
unsigned long mLastWallpaperChangeTime;
2012-09-11 14:37:54 +00:00
unsigned long mLastRenderTime;
Ogre::Timer mTimer;
size_t mProgress;
MyGUI::Widget* mLoadingBox;
2012-09-11 14:37:54 +00:00
MyGUI::TextBox* mLoadingText;
MyGUI::ScrollBar* mProgressBar;
BackgroundImage* mBackgroundImage;
2012-09-11 17:18:26 +00:00
Ogre::StringVector mResources;
2012-09-11 14:37:54 +00:00
bool mVSyncWasEnabled;
2012-09-13 10:33:09 +00:00
void changeWallpaper();
void draw();
2012-09-11 14:37:54 +00:00
};
}
#endif