Skip to content

Commit 28bc4b7

Browse files
committed
Automatic merge of T1.5.1-535-g2f57132ee and 9 pull requests
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations - Pull request #821 at cc3af66: Adds suppression of safety valves - 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 a9760ec: Notify out of focus - Pull request #855 at b39e5d8: Adds new route from TrainSimulations - Pull request #856 at ce66076: Add Alternate Syntax for Confusing Tokens - Pull request #857 at 7931a52: Adding Air Flow Meters
11 parents a439c30 + 2f57132 + 98dd1a7 + cc3af66 + 61bbf43 + d00beb9 + 410a585 + a9760ec + b39e5d8 + ce66076 + 7931a52 commit 28bc4b7

File tree

6 files changed

+22
-67
lines changed

6 files changed

+22
-67
lines changed
696 Bytes
Loading

Source/Documentation/Manual/options.rst

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ The default setting is checked.
401401

402402

403403
At game start, Electric - power connected
404-
-----------------------------------------
404+
-----------------------------------
405405

406406
When this option is checked, stationary electric locos start the simulation with power available.
407407
Uncheck this option for a more detailed behaviour in which the player has to switch on electrical equipment.
@@ -622,15 +622,6 @@ specific width and height to be used.
622622

623623
The format is <width>x<height>, for example 1024x768.
624624

625-
.. -options-out-of-focus:
626-
627-
Notify out of focus
628-
-------------------
629-
630-
When this option is checked, on the corners of the Open Rails main window a red rectangle is shown when the window is not in focus.
631-
Just a reminder that the main window currently does not react on keystrokes.
632-
633-
The default setting is unchecked.
634625

635626
.. _options-window-glass:
636627

Source/Menu/Options.Designer.cs

Lines changed: 15 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Menu/Options.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ orderby folder.Key
303303

304304
checkWindowed.Checked = !Settings.FullScreen;
305305
comboWindowSize.Text = Settings.WindowSize;
306-
checkOutOfFocus.Checked = Settings.OutOfFocus;
307306
checkWindowGlass.Checked = Settings.WindowGlass;
308307

309308
// keep values in line with enum Orts.Simulation.ConfirmLevel
@@ -510,7 +509,6 @@ void buttonOK_Click(object sender, EventArgs e)
510509
UpdateManager.SetChannel((string)control.Tag);
511510
Settings.FullScreen = !checkWindowed.Checked;
512511
Settings.WindowSize = GetValidWindowSize(comboWindowSize.Text);
513-
Settings.OutOfFocus = checkOutOfFocus.Checked;
514512
Settings.WindowGlass = checkWindowGlass.Checked;
515513
Settings.SuppressConfirmations = comboControlConfirmations.SelectedIndex;
516514
Settings.WebServerPort = (int)numericWebServerPort.Value;
@@ -886,7 +884,6 @@ private void InitializeHelpIcons()
886884
(pbLanguage, new Control[] { labelLanguage, comboLanguage }),
887885
(pbUpdateMode, new Control[] { labelUpdateMode }),
888886
(pbWindowed, new Control[] { checkWindowed, labelWindowSize, comboWindowSize }),
889-
(pbOutOfFocus, new[] { checkOutOfFocus }),
890887
(pbWindowGlass, new[] { checkWindowGlass }),
891888
(pbControlConfirmations, new Control[] { labelControlConfirmations, comboControlConfirmations }),
892889
(pbWebServerPort, new Control[] { labelWebServerPort }),
@@ -1033,10 +1030,6 @@ private void HelpIcon_Click(object sender, EventArgs _)
10331030
pbWindowed,
10341031
baseUrl + "/options.html#windowed"
10351032
},
1036-
{
1037-
pbOutOfFocus,
1038-
baseUrl + "/options.html#out-of-focus"
1039-
},
10401033
{
10411034
pbWindowGlass,
10421035
baseUrl + "/options.html#window-glass"

Source/ORTS.Settings/UserSettings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ public enum DirectXFeature
275275
public bool FullScreen { get; set; }
276276
[Default("1024x768")]
277277
public string WindowSize { get; set; }
278-
[Default(true)]
279-
public bool OutOfFocus { get; set; }
280278
[Default(false)]
281279
public bool WindowGlass { get; set; }
282280
[Default(0)]

Source/RunActivity/Viewer3D/Viewer.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,9 @@ internal void Initialize()
501501
TrainListWindow = new TrainListWindow(WindowManager);
502502
TTDetachWindow = new TTDetachWindow(WindowManager);
503503
EOTListWindow = new EOTListWindow(WindowManager);
504-
if (Settings.OutOfFocus)
504+
if (Settings.SuppressConfirmations < (int)ConfirmLevel.Error)
505+
// confirm level Error might be set to suppressed when taking a movie
506+
// do not show the out of focus red square in that case
505507
OutOfFocusWindow = new OutOfFocusWindow(WindowManager);
506508
WindowManager.Initialize();
507509

@@ -856,7 +858,9 @@ public void Update(RenderFrame frame, float elapsedRealTime)
856858
// TODO: This is not correct. The ActivityWindow's PrepareFrame is already called by the WindowManager!
857859
if (Simulator.ActivityRun != null) ActivityWindow.PrepareFrame(elapsedTime, true);
858860

859-
if (Settings.OutOfFocus)
861+
if (Settings.SuppressConfirmations < (int)ConfirmLevel.Error)
862+
// confirm level Error might be set to suppressed when taking a movie
863+
// do not show the out of focus red square in that case
860864
OutOfFocusWindow.Visible = !this.Game.IsActive;
861865

862866
WindowManager.PrepareFrame(frame, elapsedTime);

0 commit comments

Comments
 (0)