mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 20:53:53 +00:00
Fall back to player_hit_01.dds if bm_player_hit_01.dds is not available
This commit is contained in:
parent
0ae604990e
commit
2162a9e1b9
3 changed files with 13 additions and 2 deletions
|
@ -71,10 +71,15 @@ namespace MWGui
|
||||||
, mRepeat(false)
|
, mRepeat(false)
|
||||||
{
|
{
|
||||||
mMainWidget->setSize(MyGUI::RenderManager::getInstance().getViewSize());
|
mMainWidget->setSize(MyGUI::RenderManager::getInstance().getViewSize());
|
||||||
mMainWidget->setProperty("ImageTexture", texturePath);
|
setTexture(texturePath);
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenFader::setTexture(const std::string & texturePath)
|
||||||
|
{
|
||||||
|
mMainWidget->setProperty("ImageTexture", texturePath);
|
||||||
|
}
|
||||||
|
|
||||||
void ScreenFader::update(float dt)
|
void ScreenFader::update(float dt)
|
||||||
{
|
{
|
||||||
if (!mQueue.empty())
|
if (!mQueue.empty())
|
||||||
|
|
|
@ -38,6 +38,8 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
ScreenFader(const std::string & texturePath);
|
ScreenFader(const std::string & texturePath);
|
||||||
|
|
||||||
|
void setTexture(const std::string & texturePath);
|
||||||
|
|
||||||
void update(float dt);
|
void update(float dt);
|
||||||
|
|
||||||
void fadeIn(const float time);
|
void fadeIn(const float time);
|
||||||
|
|
|
@ -273,7 +273,11 @@ namespace MWGui
|
||||||
trackWindow(mCompanionWindow, "companion");
|
trackWindow(mCompanionWindow, "companion");
|
||||||
|
|
||||||
mWerewolfFader = new ScreenFader("textures\\werewolfoverlay.dds");
|
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");
|
mScreenFader = new ScreenFader("black.png");
|
||||||
|
|
||||||
mDebugWindow = new DebugWindow();
|
mDebugWindow = new DebugWindow();
|
||||||
|
|
Loading…
Reference in a new issue