mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
GUI cleanup fix
This commit is contained in:
parent
9de575ad42
commit
5a759f8b0d
4 changed files with 17 additions and 12 deletions
|
@ -311,11 +311,6 @@ int CS::Editor::run()
|
|||
return QApplication::exec();
|
||||
}
|
||||
|
||||
// for font used in overlays
|
||||
//Ogre::Root::getSingleton().addResourceLocation ((mResources / "mygui").string(),
|
||||
// "FileSystem", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true);
|
||||
|
||||
|
||||
void CS::Editor::documentAdded (CSMDoc::Document *document)
|
||||
{
|
||||
mViewManager.addView (document);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include "mainmenu.hpp"
|
||||
|
||||
#include <OgreResourceGroupManager.h>
|
||||
|
||||
#include <MyGUI_TextBox.h>
|
||||
#include <MyGUI_Gui.h>
|
||||
#include <MyGUI_RenderManager.h>
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <components/myguiplatform/myguiplatform.hpp>
|
||||
|
||||
#include <components/vfs/manager.hpp>
|
||||
|
||||
#include <components/widgets/widgets.hpp>
|
||||
#include <components/widgets/tags.hpp>
|
||||
|
||||
|
@ -180,8 +182,8 @@ namespace MWGui
|
|||
mGuiPlatform = new osgMyGUI::Platform(viewer, guiRoot, resourceSystem->getTextureManager());
|
||||
mGuiPlatform->initialise(resourcePath, logpath);
|
||||
|
||||
MyGUI::Gui* gui = new MyGUI::Gui;
|
||||
gui->initialise("");
|
||||
mGui = new MyGUI::Gui;
|
||||
mGui->initialise("");
|
||||
|
||||
createTextures();
|
||||
|
||||
|
@ -307,8 +309,8 @@ namespace MWGui
|
|||
std::string hitFaderTexture = "textures\\bm_player_hit_01.dds";
|
||||
// fall back to player_hit_01.dds if bm_player_hit_01.dds is not available
|
||||
// TODO: check if non-BM versions actually use player_hit_01.dds
|
||||
//if(!Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(hitFaderTexture))
|
||||
// hitFaderTexture = "textures\\player_hit_01.dds";
|
||||
if(!mResourceSystem->getVFS()->exists(hitFaderTexture))
|
||||
hitFaderTexture = "textures\\player_hit_01.dds";
|
||||
mHitFader = new ScreenFader(hitFaderTexture);
|
||||
mScreenFader = new ScreenFader("black.png");
|
||||
|
||||
|
@ -421,6 +423,7 @@ namespace MWGui
|
|||
|
||||
mFontLoader.reset();
|
||||
|
||||
delete mGui;
|
||||
delete mGuiPlatform;
|
||||
}
|
||||
|
||||
|
|
|
@ -438,7 +438,16 @@ namespace Gui
|
|||
|
||||
font->deserialization(root, MyGUI::Version(3,2,0));
|
||||
|
||||
MyGUI::ResourceManager::getInstance().removeByName(font->getResourceName());
|
||||
for (std::vector<MyGUI::ResourceManualFont*>::iterator it = mFonts.begin(); it != mFonts.end();)
|
||||
{
|
||||
if ((*it)->getResourceName() == font->getResourceName())
|
||||
{
|
||||
MyGUI::ResourceManager::getInstance().removeByName(font->getResourceName());
|
||||
it = mFonts.erase(it);
|
||||
}
|
||||
else
|
||||
++it;
|
||||
}
|
||||
MyGUI::ResourceManager::getInstance().addResource(font);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue