Fall back to player_hit_01.dds if bm_player_hit_01.dds is not available

deque
MiroslavR 10 years ago
parent 0ae604990e
commit 2162a9e1b9

@ -71,10 +71,15 @@ namespace MWGui
, mRepeat(false)
{
mMainWidget->setSize(MyGUI::RenderManager::getInstance().getViewSize());
mMainWidget->setProperty("ImageTexture", texturePath);
setTexture(texturePath);
setVisible(false);
}
void ScreenFader::setTexture(const std::string & texturePath)
{
mMainWidget->setProperty("ImageTexture", texturePath);
}
void ScreenFader::update(float dt)
{
if (!mQueue.empty())

@ -38,6 +38,8 @@ namespace MWGui
public:
ScreenFader(const std::string & texturePath);
void setTexture(const std::string & texturePath);
void update(float dt);
void fadeIn(const float time);

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

Loading…
Cancel
Save