1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 06:49:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/loadingscreen.hpp
scrawl d3d6dfbde8 Refactored loading screen
- Add loading progress for data files, global map, terrain
 - Refactored and improved cell loading progress
2013-08-27 15:48:13 +02:00

68 lines
1.6 KiB
C++

#ifndef MWGUI_LOADINGSCREEN_H
#define MWGUI_LOADINGSCREEN_H
#include <OgreSceneManager.h>
#include "windowbase.hpp"
#include <components/loadinglistener/loadinglistener.hpp>
namespace MWGui
{
class LoadingScreen : public WindowBase, public Loading::Listener
{
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);
virtual void removeWallpaper();
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw);
virtual ~LoadingScreen();
void setLoadingProgress (const std::string& stage, int depth, int current, int total);
void loadingDone();
void onResChange(int w, int h);
void updateWindow(Ogre::RenderWindow* rw) { mWindow = rw; }
private:
bool mFirstLoad;
Ogre::SceneManager* mSceneMgr;
Ogre::RenderWindow* mWindow;
unsigned long mLastWallpaperChangeTime;
unsigned long mLastRenderTime;
Ogre::Timer mTimer;
size_t mProgress;
MyGUI::TextBox* mLoadingText;
MyGUI::ScrollBar* mProgressBar;
MyGUI::ImageBox* mBackgroundImage;
Ogre::Rectangle2D* mRectangle;
Ogre::MaterialPtr mBackgroundMaterial;
Ogre::StringVector mResources;
void changeWallpaper();
void draw();
};
}
#endif