From bec9abd319c866796f2c6ad9c1a4f4715466757e Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 15 May 2015 23:21:29 +0200 Subject: [PATCH] Remove name extension for internal MyGUI textures Since they're no longer loaded from disk, the extension makes no sense. --- apps/openmw/mwgui/backgroundimage.cpp | 2 +- apps/openmw/mwgui/mainmenu.cpp | 2 +- apps/openmw/mwgui/mapwindow.cpp | 4 ++-- apps/openmw/mwgui/windowmanagerimp.cpp | 14 +++++++------- files/mygui/openmw_screen_fader.layout | 2 +- files/mygui/openmw_windows.skin.xml | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/openmw/mwgui/backgroundimage.cpp b/apps/openmw/mwgui/backgroundimage.cpp index ee966c189..98828a041 100644 --- a/apps/openmw/mwgui/backgroundimage.cpp +++ b/apps/openmw/mwgui/backgroundimage.cpp @@ -14,7 +14,7 @@ void BackgroundImage::setBackgroundImage (const std::string& image, bool fixedRa } if (!stretch) { - setImageTexture("black.png"); + setImageTexture("black"); if (fixedRatio) mAspect = 4.0/3.0; diff --git a/apps/openmw/mwgui/mainmenu.cpp b/apps/openmw/mwgui/mainmenu.cpp index f594cd43c..dbc513049 100644 --- a/apps/openmw/mwgui/mainmenu.cpp +++ b/apps/openmw/mwgui/mainmenu.cpp @@ -170,7 +170,7 @@ namespace MWGui // Use black background to correct aspect ratio mVideoBackground = MyGUI::Gui::getInstance().createWidgetReal("ImageBox", 0,0,1,1, MyGUI::Align::Default, "Menu"); - mVideoBackground->setImageTexture("black.png"); + mVideoBackground->setImageTexture("black"); mVideo = mVideoBackground->createWidget("ImageBox", 0,0,1,1, MyGUI::Align::Stretch, "Menu"); diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index d65e242de..4b3711071 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -222,7 +222,7 @@ namespace MWGui MyGUI::ImageBox* fog = mFogWidgets[my + 3*mx]; fog->setImageTexture(mFogOfWar ? ((MyGUI::RenderManager::getInstance().getTexture(image+"_fog") != 0) ? image+"_fog" - : "black.png" ) + : "black" ) : ""); } } @@ -354,7 +354,7 @@ namespace MWGui if (MyGUI::RenderManager::getInstance().getTexture(image) != 0) box->setImageTexture(image); else - box->setImageTexture("black.png"); + box->setImageTexture("black"); } } #endif diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index aef37809b..0a9e86750 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -238,7 +238,7 @@ namespace MWGui mVideoBackground = MyGUI::Gui::getInstance().createWidgetReal("ImageBox", 0,0,1,1, MyGUI::Align::Default, "Overlay"); - mVideoBackground->setImageTexture("black.png"); + mVideoBackground->setImageTexture("black"); mVideoBackground->setVisible(false); mVideoBackground->setNeedMouseFocus(true); mVideoBackground->setNeedKeyFocus(true); @@ -309,14 +309,14 @@ namespace MWGui mJailScreen = new JailScreen(); mWerewolfFader = new ScreenFader("textures\\werewolfoverlay.dds"); - mBlindnessFader = new ScreenFader("black.png"); + mBlindnessFader = new ScreenFader("black"); 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(!mResourceSystem->getVFS()->exists(hitFaderTexture)) hitFaderTexture = "textures\\player_hit_01.dds"; mHitFader = new ScreenFader(hitFaderTexture); - mScreenFader = new ScreenFader("black.png"); + mScreenFader = new ScreenFader("black"); mDebugWindow = new DebugWindow(); @@ -1941,7 +1941,7 @@ namespace MWGui void WindowManager::createTextures() { { - MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture("white.png"); + MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture("white"); tex->createManual(8, 8, MyGUI::TextureUsage::Write, MyGUI::PixelFormat::R8G8B8); unsigned char* data = reinterpret_cast(tex->lock(MyGUI::TextureUsage::Write)); for (int x=0; x<8; ++x) @@ -1955,7 +1955,7 @@ namespace MWGui } { - MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture("black.png"); + MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture("black"); tex->createManual(8, 8, MyGUI::TextureUsage::Write, MyGUI::PixelFormat::R8G8B8); unsigned char* data = reinterpret_cast(tex->lock(MyGUI::TextureUsage::Write)); for (int x=0; x<8; ++x) @@ -1969,7 +1969,7 @@ namespace MWGui } { - MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture("transparent.png"); + MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture("transparent"); tex->createManual(8, 8, MyGUI::TextureUsage::Write, MyGUI::PixelFormat::R8G8B8A8); setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI")); } @@ -1977,7 +1977,7 @@ namespace MWGui void WindowManager::setMenuTransparency(float value) { - MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().getTexture("transparent.png"); + MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().getTexture("transparent"); unsigned char* data = reinterpret_cast(tex->lock(MyGUI::TextureUsage::Write)); for (int x=0; x<8; ++x) for (int y=0; y<8; ++y) diff --git a/files/mygui/openmw_screen_fader.layout b/files/mygui/openmw_screen_fader.layout index fffd2e66e..13234792f 100644 --- a/files/mygui/openmw_screen_fader.layout +++ b/files/mygui/openmw_screen_fader.layout @@ -2,6 +2,6 @@ - + diff --git a/files/mygui/openmw_windows.skin.xml b/files/mygui/openmw_windows.skin.xml index ca95a552b..e74038391 100644 --- a/files/mygui/openmw_windows.skin.xml +++ b/files/mygui/openmw_windows.skin.xml @@ -2,7 +2,7 @@ - + @@ -122,7 +122,7 @@ - +