mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 08:15:37 +00:00
Use AdditiveLayer for the hit fader
This commit is contained in:
parent
a90ef8afd0
commit
d85d74e615
6 changed files with 13 additions and 4 deletions
|
@ -66,8 +66,8 @@ namespace MWGui
|
|||
mFader->notifyOperationFinished();
|
||||
}
|
||||
|
||||
ScreenFader::ScreenFader(const std::string & texturePath)
|
||||
: WindowBase("openmw_screen_fader.layout")
|
||||
ScreenFader::ScreenFader(const std::string & texturePath, const std::string& layout)
|
||||
: WindowBase(layout)
|
||||
, mCurrentAlpha(0.f)
|
||||
, mFactor(1.f)
|
||||
, mRepeat(false)
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace MWGui
|
|||
class ScreenFader : public WindowBase
|
||||
{
|
||||
public:
|
||||
ScreenFader(const std::string & texturePath);
|
||||
ScreenFader(const std::string & texturePath, const std::string& layout = "openmw_screen_fader.layout");
|
||||
|
||||
void setTexture(const std::string & texturePath);
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ namespace MWGui
|
|||
// TODO: check if non-BM versions actually use player_hit_01.dds
|
||||
if(!mResourceSystem->getVFS()->exists(hitFaderTexture))
|
||||
hitFaderTexture = "textures\\player_hit_01.dds";
|
||||
mHitFader = new ScreenFader(hitFaderTexture);
|
||||
mHitFader = new ScreenFader(hitFaderTexture, "openmw_screen_fader_hit.layout");
|
||||
mScreenFader = new ScreenFader("black");
|
||||
|
||||
mDebugWindow = new DebugWindow();
|
||||
|
|
|
@ -80,6 +80,7 @@ set(MYGUI_FILES
|
|||
openmw_savegame_dialog.layout
|
||||
openmw_recharge_dialog.layout
|
||||
openmw_screen_fader.layout
|
||||
openmw_screen_fader_hit.layout
|
||||
openmw_edit_note.layout
|
||||
openmw_debug_window.layout
|
||||
openmw_debug_window.skin.xml
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<MyGUI type="Layer" version="1.0">
|
||||
<Layer name="Overlay" overlapped="false" pick="false"/>
|
||||
<Layer name="AdditiveOverlay" type="AdditiveLayer" pick="false"/>
|
||||
<Layer name="HUD" overlapped="false" pick="true"/>
|
||||
<Layer name="Menu" overlapped="false" pick="false"/>
|
||||
<Layer name="Windows" overlapped="true" pick="true"/>
|
||||
|
|
7
files/mygui/openmw_screen_fader_hit.layout
Normal file
7
files/mygui/openmw_screen_fader_hit.layout
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Layout">
|
||||
<Widget type="ImageBox" skin="ImageBox" layer="AdditiveOverlay" position="0 0 300 200" name="_Main" align="Stretch">
|
||||
<Property key="ImageTexture" value="black"/>
|
||||
</Widget>
|
||||
</MyGUI>
|
Loading…
Reference in a new issue