OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MWGui::LoadingScreen Class Reference

#include <loadingscreen.hpp>

Inheritance diagram for MWGui::LoadingScreen:
Collaboration diagram for MWGui::LoadingScreen:

Public Member Functions

 LoadingScreen (const VFS::Manager *vfs, osgViewer::Viewer *viewer)
 
virtual ~LoadingScreen ()
 
virtual void setLabel (const std::string &label, bool important)
 Overridden from Loading::Listener, see the Loading::Listener documentation for usage details. More...
 
virtual void loadingOn ()
 
virtual void loadingOff ()
 
virtual void setProgressRange (size_t range)
 Set the total range of progress (e.g. the number of objects to load). More...
 
virtual void setProgress (size_t value)
 Set current progress. Valid range is [0, progressRange) More...
 
virtual void increaseProgress (size_t increase=1)
 Increase current progress, default by 1. More...
 
virtual void setVisible (bool visible)
 Sets the visibility of the window. More...
 
- Public Member Functions inherited from MWGui::WindowBase
 WindowBase (const std::string &parLayout)
 
virtual void open ()
 Notify that window has been made visible. More...
 
virtual void close ()
 Notify that window has been hidden. More...
 
virtual void exit ()
 Gracefully exits the window. More...
 
bool isVisible ()
 Returns the visibility state of the window. More...
 
void center ()
 
- Public Member Functions inherited from MWGui::Layout
 Layout (const std::string &_layout, MyGUI::Widget *_parent=nullptr)
 
virtual ~Layout ()
 
MyGUI::Widget * getWidget (const std::string &_name)
 
template<typename T >
void getWidget (T *&_widget, const std::string &_name)
 
void setCoord (int x, int y, int w, int h)
 
void setText (const std::string &name, const std::string &caption)
 
void setTitle (const std::string &title)
 

Private Member Functions

void findSplashScreens ()
 
bool needToDrawLoadingScreen ()
 
void changeWallpaper ()
 
void draw ()
 

Private Attributes

const VFS::ManagermVFS
 
osg::ref_ptr< osgViewer::Viewer > mViewer
 
double mTargetFrameRate
 
double mLastWallpaperChangeTime
 
double mLastRenderTime
 
osg::Timer mTimer
 
double mLoadingOnTime
 
bool mImportantLabel
 
size_t mProgress
 
MyGUI::Widget * mLoadingBox
 
MyGUI::TextBox * mLoadingText
 
MyGUI::ScrollBar * mProgressBar
 
BackgroundImagemBackgroundImage
 
std::vector< std::string > mSplashScreens
 
osg::ref_ptr< osg::Texture2D > mTexture
 
std::auto_ptr< MyGUI::ITexture > mGuiTexture
 

Additional Inherited Members

- Public Types inherited from MWGui::WindowBase
typedef
MyGUI::delegates::CMultiDelegate1
< WindowBase * > 
EventHandle_WindowBase
 
- Public Attributes inherited from MWGui::Layout
MyGUI::Widget * mMainWidget
 
- Protected Attributes inherited from MWGui::Layout
std::string mPrefix
 
std::string mLayoutName
 
MyGUI::VectorWidgetPtr mListWindowRoot
 

Constructor & Destructor Documentation

MWGui::LoadingScreen::LoadingScreen ( const VFS::Manager vfs,
osgViewer::Viewer *  viewer 
)

Here is the call graph for this function:

MWGui::LoadingScreen::~LoadingScreen ( )
virtual

Member Function Documentation

void MWGui::LoadingScreen::changeWallpaper ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::LoadingScreen::draw ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::LoadingScreen::findSplashScreens ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::LoadingScreen::increaseProgress ( size_t  increase = 1)
virtual

Increase current progress, default by 1.

Reimplemented from Loading::Listener.

Here is the call graph for this function:

void MWGui::LoadingScreen::loadingOff ( )
virtual

Reimplemented from Loading::Listener.

Here is the call graph for this function:

void MWGui::LoadingScreen::loadingOn ( )
virtual

Start a loading sequence. Must call loadingOff() when done.

Note
To get the loading screen to actually update, you must call setProgress / increaseProgress periodically.
It is best to use the ScopedLoad object instead of using loadingOn()/loadingOff() directly, so that the loading is exception safe.

Reimplemented from Loading::Listener.

Here is the call graph for this function:

bool MWGui::LoadingScreen::needToDrawLoadingScreen ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::LoadingScreen::setLabel ( const std::string &  label,
bool  important 
)
virtual

Overridden from Loading::Listener, see the Loading::Listener documentation for usage details.

Reimplemented from Loading::Listener.

void MWGui::LoadingScreen::setProgress ( size_t  value)
virtual

Set current progress. Valid range is [0, progressRange)

Reimplemented from Loading::Listener.

Here is the call graph for this function:

void MWGui::LoadingScreen::setProgressRange ( size_t  range)
virtual

Set the total range of progress (e.g. the number of objects to load).

Reimplemented from Loading::Listener.

void MWGui::LoadingScreen::setVisible ( bool  visible)
virtual

Sets the visibility of the window.

Reimplemented from MWGui::WindowBase.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

BackgroundImage* MWGui::LoadingScreen::mBackgroundImage
private
std::auto_ptr<MyGUI::ITexture> MWGui::LoadingScreen::mGuiTexture
private
bool MWGui::LoadingScreen::mImportantLabel
private
double MWGui::LoadingScreen::mLastRenderTime
private
double MWGui::LoadingScreen::mLastWallpaperChangeTime
private
MyGUI::Widget* MWGui::LoadingScreen::mLoadingBox
private
double MWGui::LoadingScreen::mLoadingOnTime
private
MyGUI::TextBox* MWGui::LoadingScreen::mLoadingText
private
size_t MWGui::LoadingScreen::mProgress
private
MyGUI::ScrollBar* MWGui::LoadingScreen::mProgressBar
private
std::vector<std::string> MWGui::LoadingScreen::mSplashScreens
private
double MWGui::LoadingScreen::mTargetFrameRate
private
osg::ref_ptr<osg::Texture2D> MWGui::LoadingScreen::mTexture
private
osg::Timer MWGui::LoadingScreen::mTimer
private
const VFS::Manager* MWGui::LoadingScreen::mVFS
private
osg::ref_ptr<osgViewer::Viewer> MWGui::LoadingScreen::mViewer
private

The documentation for this class was generated from the following files: