1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwgui/loadingscreen.hpp
Nathan Jeffords 9afe4467d8 cache results of query for spash screen names
ResourceGroupManager::listResourceNames returns a list of all resource
accessable which is expensive, this change caches the result of the
processed query so additional splash screen changes are quicker.
2013-01-03 15:45:09 -08:00

59 lines
1.3 KiB
C++

#ifndef MWGUI_LOADINGSCREEN_H
#define MWGUI_LOADINGSCREEN_H
#include <OgreSceneManager.h>
#include <OgreResourceGroupManager.h>
#include "window_base.hpp"
namespace MWGui
{
class LoadingScreen : public WindowBase
{
public:
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw, MWBase::WindowManager& parWindowManager);
virtual ~LoadingScreen();
void setLoadingProgress (const std::string& stage, int depth, int current, int total);
void loadingDone();
void onResChange(int w, int h);
private:
bool mFirstLoad;
Ogre::SceneManager* mSceneMgr;
Ogre::RenderWindow* mWindow;
unsigned long mLastWallpaperChangeTime;
unsigned long mLastRenderTime;
Ogre::Timer mTimer;
MyGUI::TextBox* mLoadingText;
MyGUI::ProgressBar* mProgressBar;
MyGUI::ImageBox* mBackgroundImage;
int mCurrentCellLoading;
int mTotalCellsLoading;
int mCurrentRefLoading;
int mTotalRefsLoading;
int mCurrentRefList;
Ogre::Rectangle2D* mRectangle;
Ogre::MaterialPtr mBackgroundMaterial;
Ogre::StringVectorPtr mResources;
bool mLoadingOn;
void loadingOn();
void loadingOff();
void changeWallpaper();
};
}
#endif