forked from mirror/openmw-tes3mp
41 lines
832 B
C++
41 lines
832 B
C++
|
#include "overlaysystem.hpp"
|
||
|
|
||
|
#include <OgreOverlaySystem.h>
|
||
|
|
||
|
namespace CSVRender
|
||
|
{
|
||
|
OverlaySystem *OverlaySystem::mOverlaySystemInstance = 0;
|
||
|
|
||
|
OverlaySystem::OverlaySystem() : mOverlaySystem(NULL)
|
||
|
{
|
||
|
assert(!mOverlaySystemInstance);
|
||
|
mOverlaySystemInstance = this;
|
||
|
}
|
||
|
|
||
|
OverlaySystem::~OverlaySystem()
|
||
|
{
|
||
|
if(mOverlaySystem)
|
||
|
delete mOverlaySystem;
|
||
|
}
|
||
|
|
||
|
OverlaySystem &OverlaySystem::instance()
|
||
|
{
|
||
|
assert(mOverlaySystemInstance);
|
||
|
return *mOverlaySystemInstance;
|
||
|
}
|
||
|
|
||
|
Ogre::OverlaySystem *OverlaySystem::get()
|
||
|
{
|
||
|
if(!mOverlaySystem)
|
||
|
mOverlaySystem = new Ogre::OverlaySystem();
|
||
|
return mOverlaySystem;
|
||
|
}
|
||
|
|
||
|
void OverlaySystem::destroy()
|
||
|
{
|
||
|
delete mOverlaySystem;
|
||
|
mOverlaySystem = NULL;
|
||
|
}
|
||
|
}
|
||
|
|