@@ -39,19 +39,9 @@ public OutOfFocusWindow(WindowManager owner) : base(owner)
3939 Height = owner . Viewer . GraphicsDevice . Viewport . Height ;
4040 }
4141
42- public override void Draw ( SpriteBatch SpriteBatch )
42+ private float ConvertToRadiansFromDegrees ( int angle )
4343 {
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 ) ;
44+ return ( float ) ( ( System . Math . PI / 180 ) * angle ) ;
5545 }
5646
5747 private void DrawLine ( SpriteBatch SpriteBatch , int X , int Y , int width , int height , int degrees )
@@ -61,14 +51,24 @@ private void DrawLine(SpriteBatch SpriteBatch, int X, int Y, int width, int heig
6151 new Rectangle ( X , Y , width , height ) ,
6252 null ,
6353 Color ,
64- ( float ) ConvertToRadiansFromDegrees ( degrees ) ,
54+ ConvertToRadiansFromDegrees ( degrees ) ,
6555 new Vector2 ( 0 , 0 ) ,
6656 SpriteEffects . None , 0 ) ;
67- }
57+ }
6858
69- private float ConvertToRadiansFromDegrees ( int angle )
59+ public override void Draw ( SpriteBatch SpriteBatch )
7060 {
71- return ( float ) ( ( System . Math . PI / 180 ) * angle ) ;
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 ) ;
7272 }
7373 }
7474}
0 commit comments