aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/ShiftOS.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-08-02 08:58:31 -0400
committerMichael <[email protected]>2017-08-02 08:58:31 -0400
commit52319b29eef65560a737353a71e1e4017dc87c09 (patch)
tree288103571e3f699b050a28b37be9a48861ed2ffb /ShiftOS.Frontend/ShiftOS.cs
parentc832b7830853c33bed586e89ddae261200bb526e (diff)
downloadshiftos_thereturn-52319b29eef65560a737353a71e1e4017dc87c09.tar.gz
shiftos_thereturn-52319b29eef65560a737353a71e1e4017dc87c09.tar.bz2
shiftos_thereturn-52319b29eef65560a737353a71e1e4017dc87c09.zip
screen fades to red as connection timer goes down
Diffstat (limited to 'ShiftOS.Frontend/ShiftOS.cs')
-rw-r--r--ShiftOS.Frontend/ShiftOS.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/ShiftOS.Frontend/ShiftOS.cs b/ShiftOS.Frontend/ShiftOS.cs
index 61a20fb..597c4ff 100644
--- a/ShiftOS.Frontend/ShiftOS.cs
+++ b/ShiftOS.Frontend/ShiftOS.cs
@@ -252,15 +252,22 @@ namespace ShiftOS.Frontend
if (Hacking.CurrentHackable.DoConnectionTimeout)
{
Hacking.CurrentHackable.MillisecondsCountdown -= gameTime.ElapsedGameTime.TotalMilliseconds;
- if(Hacking.CurrentHackable.MillisecondsCountdown <= 0)
+ shroudOpacity = (float)GUI.ProgressBar.linear(Hacking.CurrentHackable.MillisecondsCountdown, Hacking.CurrentHackable.TotalConnectionTimeMS, 0, 0, 1);
+ if (Hacking.CurrentHackable.MillisecondsCountdown <= 0)
{
Hacking.FailHack();
}
}
}
+ else
+ {
+ shroudOpacity = 0;
+ }
base.Update(gameTime);
}
+ float shroudOpacity = 0.0f;
+
private GUI.TextControl framerate = new GUI.TextControl();
/// <summary>
@@ -292,6 +299,8 @@ namespace ShiftOS.Frontend
spriteBatch.Draw(MouseTexture, new Rectangle(mousepos.X+1, mousepos.Y+1, MouseTexture.Width, MouseTexture.Height), Color.Black * 0.5f);
spriteBatch.Draw(MouseTexture, new Rectangle(mousepos.X, mousepos.Y, MouseTexture.Width, MouseTexture.Height), Color.White);
+ spriteBatch.Draw(UIManager.SkinTextures["PureWhite"], new Rectangle(0, 0, UIManager.Viewport.Width, UIManager.Viewport.Height), Color.Red * shroudOpacity);
+
if(Hacking.CurrentHackable != null)
{
if (Hacking.CurrentHackable.DoConnectionTimeout)