mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 16:06:41 +00:00
Initialize all required osgMyGUI::DataManager members in constructor
This commit is contained in:
parent
1c507125df
commit
6738722aa5
3 changed files with 5 additions and 6 deletions
|
@ -31,8 +31,9 @@ void DataManager::setResourcePath(const std::string &path)
|
||||||
mResourcePath = path;
|
mResourcePath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataManager::DataManager(const VFS::Manager* vfs)
|
DataManager::DataManager(const std::string& resourcePath, const VFS::Manager* vfs)
|
||||||
: mVfs(vfs)
|
: mResourcePath(resourcePath)
|
||||||
|
, mVfs(vfs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace osgMyGUI
|
||||||
class DataManager : public MyGUI::DataManager
|
class DataManager : public MyGUI::DataManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DataManager(const VFS::Manager* vfs);
|
explicit DataManager(const std::string& path, const VFS::Manager* vfs);
|
||||||
|
|
||||||
void setResourcePath(const std::string& path);
|
void setResourcePath(const std::string& path);
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,12 @@ Platform::Platform(osgViewer::Viewer *viewer, osg::Group* guiRoot, Resource::Ima
|
||||||
const VFS::Manager* vfs, float uiScalingFactor, const std::string& resourcePath, const std::string& logName)
|
const VFS::Manager* vfs, float uiScalingFactor, const std::string& resourcePath, const std::string& logName)
|
||||||
: mLogFacility(logName.empty() ? nullptr : std::make_unique<LogFacility>(logName, false))
|
: mLogFacility(logName.empty() ? nullptr : std::make_unique<LogFacility>(logName, false))
|
||||||
, mLogManager(std::make_unique<MyGUI::LogManager>())
|
, mLogManager(std::make_unique<MyGUI::LogManager>())
|
||||||
, mDataManager(std::make_unique<DataManager>(vfs))
|
, mDataManager(std::make_unique<DataManager>(resourcePath, vfs))
|
||||||
, mRenderManager(std::make_unique<RenderManager>(viewer, guiRoot, imageManager, uiScalingFactor))
|
, mRenderManager(std::make_unique<RenderManager>(viewer, guiRoot, imageManager, uiScalingFactor))
|
||||||
{
|
{
|
||||||
if (mLogFacility != nullptr)
|
if (mLogFacility != nullptr)
|
||||||
mLogManager->addLogSource(mLogFacility->getSource());
|
mLogManager->addLogSource(mLogFacility->getSource());
|
||||||
|
|
||||||
mDataManager->setResourcePath(resourcePath);
|
|
||||||
|
|
||||||
mRenderManager->initialise();
|
mRenderManager->initialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue