Skip to content

Commit

Permalink
Automatic merge of T1.5.1-535-g2f57132ee and 9 pull requests
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
openrails-bot committed Aug 1, 2023
11 parents a439c30 + 2f57132 + 98dd1a7 + cc3af66 + 61bbf43 + d00beb9 + 410a585 + a9760ec + b39e5d8 + ce66076 + 7931a52 commit 28bc4b7
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 67 deletions.
Binary file modified Source/Documentation/Manual/images/options-system.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 1 addition & 10 deletions Source/Documentation/Manual/options.rst
Expand Up @@ -401,7 +401,7 @@ The default setting is checked.


At game start, Electric - power connected
-----------------------------------------
-----------------------------------

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

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

.. -options-out-of-focus:
Notify out of focus
-------------------

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.
Just a reminder that the main window currently does not react on keystrokes.

The default setting is unchecked.

.. _options-window-glass:

Expand Down
61 changes: 15 additions & 46 deletions Source/Menu/Options.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions Source/Menu/Options.cs
Expand Up @@ -303,7 +303,6 @@ orderby folder.Key

checkWindowed.Checked = !Settings.FullScreen;
comboWindowSize.Text = Settings.WindowSize;
checkOutOfFocus.Checked = Settings.OutOfFocus;
checkWindowGlass.Checked = Settings.WindowGlass;

// keep values in line with enum Orts.Simulation.ConfirmLevel
Expand Down Expand Up @@ -510,7 +509,6 @@ void buttonOK_Click(object sender, EventArgs e)
UpdateManager.SetChannel((string)control.Tag);
Settings.FullScreen = !checkWindowed.Checked;
Settings.WindowSize = GetValidWindowSize(comboWindowSize.Text);
Settings.OutOfFocus = checkOutOfFocus.Checked;
Settings.WindowGlass = checkWindowGlass.Checked;
Settings.SuppressConfirmations = comboControlConfirmations.SelectedIndex;
Settings.WebServerPort = (int)numericWebServerPort.Value;
Expand Down Expand Up @@ -886,7 +884,6 @@ private void InitializeHelpIcons()
(pbLanguage, new Control[] { labelLanguage, comboLanguage }),
(pbUpdateMode, new Control[] { labelUpdateMode }),
(pbWindowed, new Control[] { checkWindowed, labelWindowSize, comboWindowSize }),
(pbOutOfFocus, new[] { checkOutOfFocus }),
(pbWindowGlass, new[] { checkWindowGlass }),
(pbControlConfirmations, new Control[] { labelControlConfirmations, comboControlConfirmations }),
(pbWebServerPort, new Control[] { labelWebServerPort }),
Expand Down Expand Up @@ -1033,10 +1030,6 @@ private void HelpIcon_Click(object sender, EventArgs _)
pbWindowed,
baseUrl + "/options.html#windowed"
},
{
pbOutOfFocus,
baseUrl + "/options.html#out-of-focus"
},
{
pbWindowGlass,
baseUrl + "/options.html#window-glass"
Expand Down
2 changes: 0 additions & 2 deletions Source/ORTS.Settings/UserSettings.cs
Expand Up @@ -275,8 +275,6 @@ public enum DirectXFeature
public bool FullScreen { get; set; }
[Default("1024x768")]
public string WindowSize { get; set; }
[Default(true)]
public bool OutOfFocus { get; set; }
[Default(false)]
public bool WindowGlass { get; set; }
[Default(0)]
Expand Down
8 changes: 6 additions & 2 deletions Source/RunActivity/Viewer3D/Viewer.cs
Expand Up @@ -501,7 +501,9 @@ internal void Initialize()
TrainListWindow = new TrainListWindow(WindowManager);
TTDetachWindow = new TTDetachWindow(WindowManager);
EOTListWindow = new EOTListWindow(WindowManager);
if (Settings.OutOfFocus)
if (Settings.SuppressConfirmations < (int)ConfirmLevel.Error)
// confirm level Error might be set to suppressed when taking a movie
// do not show the out of focus red square in that case
OutOfFocusWindow = new OutOfFocusWindow(WindowManager);
WindowManager.Initialize();

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

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

WindowManager.PrepareFrame(frame, elapsedTime);
Expand Down

0 comments on commit 28bc4b7

Please sign in to comment.