Merge pull request #1233 from akortunov/guifixes

Vanilla style drowning widget
0.6.1
scrawl 8 years ago committed by GitHub
commit 373bd78cf3

@ -609,8 +609,9 @@ namespace MWGui
if (mIsDrowning)
{
float intensity = (cos(mDrowningFlashTheta) + 1.0f) / 2.0f;
mDrowningFlash->setColour(MyGUI::Colour(intensity, 0, 0));
float intensity = (cos(mDrowningFlashTheta) + 2.0f) / 3.0f;
mDrowningFlash->setAlpha(intensity);
}
}

@ -324,6 +324,9 @@ namespace MWMechanics
winMgr->setValue(fbar, stats.getFatigue());
}
// FIXME: if game is just started and actor is already drowning (on savegame loading),
// drowning bar will be hidden, because
// getTimeToStartDrowning = mWatchedTimeToStartDrowning = 0.
if(stats.getTimeToStartDrowning() != mWatchedTimeToStartDrowning)
{
const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()

@ -32,18 +32,19 @@
</Widget>
<!-- Drowning bar -->
<Widget type="Widget" skin="HUD_Box" position="0 36 220 56" align="Center Top" name="DrowningFrame">
<Widget type="Widget" skin="MW_Dialog" position="0 36 230 58" align="Center Top" name="DrowningFrame">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="0 8 220 24" name="DrowningTitle" align="Center Top HStretch">
<Widget type="TextBox" skin="SandText" position="2 7 226 24" name="DrowningTitle" align="Center Top HStretch">
<Property key="Caption" value="#{sBreath}"/>
<Property key="TextAlign" value="Center"/>
<Property key="TextShadow" value="true"/>
<Property key="TextShadowColour" value="0 0 0"/>
</Widget>
<Widget type="ProgressBar" skin="MW_Progress_LightBlue" position="12 36 196 8" align="Center Top" name="Drowning">
<Widget type="Widget" skin="MW_Box" position="15 33 200 10" align="Stretch" name="BoundingBox"/>
<Widget type="ProgressBar" skin="MW_Progress_Drowning_Full" position="17 35 196 6" align="Center Top" name="Drowning">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="Widget" skin="MW_Progress_Drowning" position="14 38 192 4" align="Center Top" name="Flash"/>
<Widget type="Widget" skin="MW_Progress_Drowning_Small" position="19 37 192 2" align="Center Top" name="Flash"/>
</Widget>
<!-- Equipped weapon/selected spell name display for a few seconds after it changes -->

@ -39,8 +39,18 @@
<State name="normal" offset="0 0 16 8"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="MW_Progress_Drowning_Full_Small" size="16 8" texture="white" >
<Property key="Colour" value="0.035 0.545 0.545"/>
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
<State name="normal" offset="0 0 16 8"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="MW_Progress_Drowning_Small" size="16 8" texture="white" >
<Property key="Colour" value="0.785 0 0"/>
<BasisSkin type="MainSkin" offset="0 0 16 8" align="Stretch">
<State name="normal" offset="0 0 16 8"/>
</BasisSkin>
</Resource>
<Resource type="ResourceSkin" name="ProgressText" size="16 16">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Top HCenter"/>
@ -76,19 +86,12 @@
<Child type="Widget" skin="BlackBG" offset="2 2 60 8" align="Stretch" name="Client"/>
</Resource>
<Resource type="ResourceSkin" name="MW_Progress_LightBlue" size="64 6">
<Property key="TrackSkin" value="MW_BigTrack_Progress_Blue_Small"/>
<Resource type="ResourceSkin" name="MW_Progress_Drowning_Full" size="64 6">
<Property key="TrackSkin" value="MW_Progress_Drowning_Full_Small"/>
<Property key="TrackFill" value="1"/>
<Child type="Widget" skin="MW_Box" offset="0 0 64 6" align="Stretch"/>
<Child type="Widget" skin="BlackBG" offset="2 2 60 2" align="Stretch" name="Client"/>
</Resource>
<Resource type="ResourceSkin" name="MW_Progress_Drowning" size="64 6">
<Property key="TrackSkin" value="MW_BigTrack_Progress_Red_Small"/>
<Property key="TrackFill" value="1"/>
</Resource>
<Resource type="ResourceSkin" name="MW_ProgressScroll_Loading" size="64 6">
<Property key="TrackFill" value="1"/>
<Property key="TrackRangeMargins" value="0 0"/>

Loading…
Cancel
Save