Skip to content

Commit 7b58e77

Browse files
Might fix the last Codacy error
1 parent 00060a8 commit 7b58e77

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Source/RunActivity/Viewer3D/Popups/OutOfFocusWindow.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,24 @@ public OutOfFocusWindow(WindowManager owner) : base(owner)
3939
Height = owner.Viewer.GraphicsDevice.Viewport.Height;
4040
}
4141

42-
private float ConvertToRadiansFromDegrees(int angle)
42+
public override void Draw(SpriteBatch spriteBatch)
4343
{
44-
return (float)((System.Math.PI / 180) * angle);
44+
// top
45+
DrawLine(spriteBatch, 0, 0, Width, Thickness, 0);
46+
47+
// bottom
48+
DrawLine(spriteBatch, 0, Height - Thickness, Width, Thickness, 0);
49+
50+
// left
51+
DrawLine(spriteBatch, Thickness, Thickness, Height, Thickness, 90);
52+
53+
// right
54+
DrawLine(spriteBatch, Width, Thickness, Height, Thickness, 90);
4555
}
4656

47-
private void DrawLine(SpriteBatch SpriteBatch, int X, int Y, int width, int height, int degrees)
57+
private void DrawLine(SpriteBatch spriteBatch, int X, int Y, int width, int height, int degrees)
4858
{
49-
SpriteBatch.Draw(
59+
spriteBatch.Draw(
5060
Line,
5161
new Rectangle(X, Y, width, height),
5262
null,
@@ -56,19 +66,9 @@ private void DrawLine(SpriteBatch SpriteBatch, int X, int Y, int width, int heig
5666
SpriteEffects.None, 0);
5767
}
5868

59-
public override void Draw(SpriteBatch SpriteBatch)
69+
private float ConvertToRadiansFromDegrees(int angle)
6070
{
61-
// top
62-
DrawLine(SpriteBatch, 0, 0, Width, Thickness, 0);
63-
64-
// bottom
65-
DrawLine(SpriteBatch, 0, Height - Thickness, Width, Thickness, 0);
66-
67-
// left
68-
DrawLine(SpriteBatch, Thickness, Thickness, Height, Thickness, 90);
69-
70-
// right
71-
DrawLine(SpriteBatch, Width, Thickness, Height, Thickness, 90);
71+
return (float)((System.Math.PI / 180) * angle);
7272
}
7373
}
7474
}

0 commit comments

Comments
 (0)