1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 16:53:55 +00:00

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

This commit is contained in:
MiroslavR 2014-10-11 23:09:20 +02:00
parent 0ae604990e
commit 2162a9e1b9
3 changed files with 13 additions and 2 deletions

View file

@ -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())

View file

@ -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);

View file

@ -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();