Construct hit fader with correct texture right away to prevent mygui warning

deque
MiroslavR 10 years ago
parent a5e972aeb5
commit 8dd95fd77e

@ -273,11 +273,12 @@ namespace MWGui
trackWindow(mCompanionWindow, "companion"); trackWindow(mCompanionWindow, "companion");
mWerewolfFader = new ScreenFader("textures\\werewolfoverlay.dds"); mWerewolfFader = new ScreenFader("textures\\werewolfoverlay.dds");
mHitFader = new ScreenFader("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(!Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup("textures\\bm_player_hit_01.dds")) if(!Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(hitFaderTexture))
mHitFader->setTexture("textures\\player_hit_01.dds"); hitFaderTexture = "textures\\player_hit_01.dds";
mHitFader = new ScreenFader(hitFaderTexture);
mScreenFader = new ScreenFader("black.png"); mScreenFader = new ScreenFader("black.png");
mDebugWindow = new DebugWindow(); mDebugWindow = new DebugWindow();

Loading…
Cancel
Save