Skip to content

Commit 89c91ae

Browse files
committed
Automatic merge of T1.5.1-553-g4b9199858 and 13 pull requests
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations - Pull request #831 at 61bbf43: poor mans switch panel on tablet - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows - Pull request #853 at d05f581: Notify out of focus - Pull request #855 at b39e5d8: Adds new route from TrainSimulations - Pull request #857 at 9afc8c3: Adding Air Flow Meters - Pull request #859 at fff2560: Steam adhesion bug#1 - Pull request #860 at d2b8a52: Changes in the Car Operations Menu for the lines with brake information - Pull request #862 at 489f261: Fix engine leak problem - Pull request #863 at a34b857: Alternate preset 3D cabviewpoints - Pull request #864 at 2fed4b9: Fixes for Undesired Emergency Applications - Pull request #865 at 705126e: Dispatcher window improvements
15 parents 4b97ee5 + 4b91998 + 98dd1a7 + 61bbf43 + d00beb9 + 410a585 + d05f581 + b39e5d8 + 9afc8c3 + fff2560 + d2b8a52 + 489f261 + a34b857 + 2fed4b9 + 705126e commit 89c91ae

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

Source/RunActivity/Viewer3D/Popups/OutOfFocusWindow.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,28 @@ public class OutOfFocusWindow : Window
3434
private readonly int Thickness = 3;
3535
private readonly Color Color = Color.Red;
3636

37-
private readonly int Width;
38-
private readonly int Height;
39-
4037
public OutOfFocusWindow(WindowManager owner) : base(owner)
4138
{
42-
Line = new Texture2D(owner.Viewer.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
39+
Line = new Texture2D(Owner.Viewer.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
4340
Line.SetData(new[] { Color });
44-
45-
Width = owner.Viewer.GraphicsDevice.Viewport.Width;
46-
Height = owner.Viewer.GraphicsDevice.Viewport.Height;
4741
}
4842

4943
public override void Draw(SpriteBatch spriteBatch)
5044
{
45+
int width = Owner.Viewer.GraphicsDevice.Viewport.Width;
46+
int height = Owner.Viewer.GraphicsDevice.Viewport.Height;
47+
5148
// top
52-
DrawLine(spriteBatch, 0, 0, Width, Thickness, 0);
49+
DrawLine(spriteBatch, 0, 0, width, Thickness, 0);
5350

5451
// bottom
55-
DrawLine(spriteBatch, 0, Height - Thickness, Width, Thickness, 0);
52+
DrawLine(spriteBatch, 0, height - Thickness, width, Thickness, 0);
5653

5754
// left
58-
DrawLine(spriteBatch, Thickness, Thickness, Height, Thickness, 90);
55+
DrawLine(spriteBatch, Thickness, Thickness, height, Thickness, 90);
5956

6057
// right
61-
DrawLine(spriteBatch, Width, Thickness, Height, Thickness, 90);
58+
DrawLine(spriteBatch, width, Thickness, height, Thickness, 90);
6259
}
6360

6461
private void DrawLine(SpriteBatch spriteBatch, int X, int Y, int width, int height, int degrees)

0 commit comments

Comments
 (0)