mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:45:36 +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;
|
||||
}
|
||||
|
||||
DataManager::DataManager(const VFS::Manager* vfs)
|
||||
: mVfs(vfs)
|
||||
DataManager::DataManager(const std::string& resourcePath, const VFS::Manager* vfs)
|
||||
: mResourcePath(resourcePath)
|
||||
, mVfs(vfs)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace osgMyGUI
|
|||
class DataManager : public MyGUI::DataManager
|
||||
{
|
||||
public:
|
||||
DataManager(const VFS::Manager* vfs);
|
||||
explicit DataManager(const std::string& path, const VFS::Manager* vfs);
|
||||
|
||||
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)
|
||||
: mLogFacility(logName.empty() ? nullptr : std::make_unique<LogFacility>(logName, false))
|
||||
, 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))
|
||||
{
|
||||
if (mLogFacility != nullptr)
|
||||
mLogManager->addLogSource(mLogFacility->getSource());
|
||||
|
||||
mDataManager->setResourcePath(resourcePath);
|
||||
|
||||
mRenderManager->initialise();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue