Remove name extension for internal MyGUI textures

Since they're no longer loaded from disk, the extension makes no sense.
c++11
scrawl 10 years ago
parent 737c2114dc
commit bec9abd319

@ -14,7 +14,7 @@ void BackgroundImage::setBackgroundImage (const std::string& image, bool fixedRa
} }
if (!stretch) if (!stretch)
{ {
setImageTexture("black.png"); setImageTexture("black");
if (fixedRatio) if (fixedRatio)
mAspect = 4.0/3.0; mAspect = 4.0/3.0;

@ -170,7 +170,7 @@ namespace MWGui
// Use black background to correct aspect ratio // Use black background to correct aspect ratio
mVideoBackground = MyGUI::Gui::getInstance().createWidgetReal<MyGUI::ImageBox>("ImageBox", 0,0,1,1, mVideoBackground = MyGUI::Gui::getInstance().createWidgetReal<MyGUI::ImageBox>("ImageBox", 0,0,1,1,
MyGUI::Align::Default, "Menu"); MyGUI::Align::Default, "Menu");
mVideoBackground->setImageTexture("black.png"); mVideoBackground->setImageTexture("black");
mVideo = mVideoBackground->createWidget<VideoWidget>("ImageBox", 0,0,1,1, mVideo = mVideoBackground->createWidget<VideoWidget>("ImageBox", 0,0,1,1,
MyGUI::Align::Stretch, "Menu"); MyGUI::Align::Stretch, "Menu");

@ -222,7 +222,7 @@ namespace MWGui
MyGUI::ImageBox* fog = mFogWidgets[my + 3*mx]; MyGUI::ImageBox* fog = mFogWidgets[my + 3*mx];
fog->setImageTexture(mFogOfWar ? fog->setImageTexture(mFogOfWar ?
((MyGUI::RenderManager::getInstance().getTexture(image+"_fog") != 0) ? image+"_fog" ((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) if (MyGUI::RenderManager::getInstance().getTexture(image) != 0)
box->setImageTexture(image); box->setImageTexture(image);
else else
box->setImageTexture("black.png"); box->setImageTexture("black");
} }
} }
#endif #endif

@ -238,7 +238,7 @@ namespace MWGui
mVideoBackground = MyGUI::Gui::getInstance().createWidgetReal<MyGUI::ImageBox>("ImageBox", 0,0,1,1, mVideoBackground = MyGUI::Gui::getInstance().createWidgetReal<MyGUI::ImageBox>("ImageBox", 0,0,1,1,
MyGUI::Align::Default, "Overlay"); MyGUI::Align::Default, "Overlay");
mVideoBackground->setImageTexture("black.png"); mVideoBackground->setImageTexture("black");
mVideoBackground->setVisible(false); mVideoBackground->setVisible(false);
mVideoBackground->setNeedMouseFocus(true); mVideoBackground->setNeedMouseFocus(true);
mVideoBackground->setNeedKeyFocus(true); mVideoBackground->setNeedKeyFocus(true);
@ -309,14 +309,14 @@ namespace MWGui
mJailScreen = new JailScreen(); mJailScreen = new JailScreen();
mWerewolfFader = new ScreenFader("textures\\werewolfoverlay.dds"); mWerewolfFader = new ScreenFader("textures\\werewolfoverlay.dds");
mBlindnessFader = new ScreenFader("black.png"); mBlindnessFader = new ScreenFader("black");
std::string hitFaderTexture = "textures\\bm_player_hit_01.dds"; 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 // 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 // TODO: check if non-BM versions actually use player_hit_01.dds
if(!mResourceSystem->getVFS()->exists(hitFaderTexture)) if(!mResourceSystem->getVFS()->exists(hitFaderTexture))
hitFaderTexture = "textures\\player_hit_01.dds"; hitFaderTexture = "textures\\player_hit_01.dds";
mHitFader = new ScreenFader(hitFaderTexture); mHitFader = new ScreenFader(hitFaderTexture);
mScreenFader = new ScreenFader("black.png"); mScreenFader = new ScreenFader("black");
mDebugWindow = new DebugWindow(); mDebugWindow = new DebugWindow();
@ -1941,7 +1941,7 @@ namespace MWGui
void WindowManager::createTextures() 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); tex->createManual(8, 8, MyGUI::TextureUsage::Write, MyGUI::PixelFormat::R8G8B8);
unsigned char* data = reinterpret_cast<unsigned char*>(tex->lock(MyGUI::TextureUsage::Write)); unsigned char* data = reinterpret_cast<unsigned char*>(tex->lock(MyGUI::TextureUsage::Write));
for (int x=0; x<8; ++x) 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); tex->createManual(8, 8, MyGUI::TextureUsage::Write, MyGUI::PixelFormat::R8G8B8);
unsigned char* data = reinterpret_cast<unsigned char*>(tex->lock(MyGUI::TextureUsage::Write)); unsigned char* data = reinterpret_cast<unsigned char*>(tex->lock(MyGUI::TextureUsage::Write));
for (int x=0; x<8; ++x) 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); tex->createManual(8, 8, MyGUI::TextureUsage::Write, MyGUI::PixelFormat::R8G8B8A8);
setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI")); setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI"));
} }
@ -1977,7 +1977,7 @@ namespace MWGui
void WindowManager::setMenuTransparency(float value) 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<unsigned char*>(tex->lock(MyGUI::TextureUsage::Write)); unsigned char* data = reinterpret_cast<unsigned char*>(tex->lock(MyGUI::TextureUsage::Write));
for (int x=0; x<8; ++x) for (int x=0; x<8; ++x)
for (int y=0; y<8; ++y) for (int y=0; y<8; ++y)

@ -2,6 +2,6 @@
<MyGUI type="Layout"> <MyGUI type="Layout">
<Widget type="ImageBox" skin="ImageBox" layer="Render" position="0 0 300 200" name="_Main" align="Stretch"> <Widget type="ImageBox" skin="ImageBox" layer="Render" position="0 0 300 200" name="_Main" align="Stretch">
<Property key="ImageTexture" value="black.png"/> <Property key="ImageTexture" value="black"/>
</Widget> </Widget>
</MyGUI> </MyGUI>

@ -2,7 +2,7 @@
<MyGUI type="Resource" version="1.1"> <MyGUI type="Resource" version="1.1">
<!-- Defines a transparent background --> <!-- Defines a transparent background -->
<Resource type="ResourceSkin" name="BlackBG" size="8 8" texture="transparent.png"> <Resource type="ResourceSkin" name="BlackBG" size="8 8" texture="transparent">
<Property key="Colour" value="#{fontcolour=background}"/> <Property key="Colour" value="#{fontcolour=background}"/>
<BasisSkin type="MainSkin" offset="0 0 8 8"> <BasisSkin type="MainSkin" offset="0 0 8 8">
<State name="normal" offset="0 0 8 8"/> <State name="normal" offset="0 0 8 8"/>
@ -122,7 +122,7 @@
</Resource> </Resource>
<!-- Defines a pure black background --> <!-- Defines a pure black background -->
<Resource type="ResourceSkin" name="DialogBG" size="8 8" texture="white.png"> <Resource type="ResourceSkin" name="DialogBG" size="8 8" texture="white">
<Property key="Colour" value="#{fontcolour=background}"/> <Property key="Colour" value="#{fontcolour=background}"/>
<BasisSkin type="MainSkin" offset="0 0 8 8"> <BasisSkin type="MainSkin" offset="0 0 8 8">
<State name="normal" offset="0 0 8 8"/> <State name="normal" offset="0 0 8 8"/>

Loading…
Cancel
Save