Skip to content

Commit e8acdc8

Browse files
authored
Merge pull request #592 from cjakeman/menu-options02j
02j: Removed menu option ViewDispatcher . Now always available.
2 parents d16ea96 + 6d154b2 commit e8acdc8

File tree

6 files changed

+62
-104
lines changed

6 files changed

+62
-104
lines changed
-57.1 KB
Binary file not shown.
864 Bytes
Loading

Source/Documentation/Manual/options.rst

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ therefore will not see the alerter warning, selecting the related option
3434

3535

3636
.. _options-control-confirmations:
37+
3738
Control confirmations
3839
---------------------
3940

@@ -56,23 +57,6 @@ Control confirmations can also be toggled on and off at runtime using the
5657
key combination Ctrl-Alt-F10.
5758

5859

59-
.. _options-map-window:
60-
61-
Map window
62-
-----------------
63-
64-
It is suggested to always select this option. When this option is selected,
65-
pressing ``<Ctrl+9>`` at runtime creates an additional window like the
66-
following. This window coexists with the main Open Rails window, and
67-
``<Alt+Tab>`` switches between it and the Open Rails window. See the related
68-
option :ref:`Fast fullscreen Alt+Tab <options-fullscreen>`.
69-
70-
Through this window you can monitor train movements and also influence
71-
them, by setting signals and switches. A complete description of the
72-
dispatcher tab can be found :ref:`here <driving-dispatcher>`.
73-
74-
.. image:: images/options-dispatcher.png
75-
7660
Graduated release air brakes
7761
----------------------------
7862

Source/Menu/Options.Designer.cs

Lines changed: 0 additions & 32 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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init
143143
checkAlerterExternal.Checked = Settings.Alerter && !Settings.AlerterDisableExternal;
144144
checkOverspeedMonitor.Checked = Settings.SpeedControl;
145145
checkControlConfirmations.Checked = !Settings.SuppressConfirmations;
146-
checkViewMapWindow.Checked = Settings.ViewDispatcher;
147146
checkRetainers.Checked = Settings.RetainersOnAllCars;
148147
checkGraduatedRelease.Checked = Settings.GraduatedRelease;
149148
numericBrakePipeChargingRate.Value = Settings.BrakePipeChargingRate;
@@ -426,7 +425,6 @@ void buttonOK_Click(object sender, EventArgs e)
426425
Settings.AlerterDisableExternal = !checkAlerterExternal.Checked;
427426
Settings.SpeedControl = checkOverspeedMonitor.Checked;
428427
Settings.SuppressConfirmations = !checkControlConfirmations.Checked;
429-
Settings.ViewDispatcher = checkViewMapWindow.Checked;
430428
Settings.RetainersOnAllCars = checkRetainers.Checked;
431429
Settings.GraduatedRelease = checkGraduatedRelease.Checked;
432430
Settings.BrakePipeChargingRate = (int)numericBrakePipeChargingRate.Value;
@@ -817,7 +815,6 @@ private void InitializeHelpIcons()
817815
{
818816
(pbAlerter, new[] { checkAlerter }),
819817
(pbControlConfirmations, new[] { checkControlConfirmations }),
820-
(pbMapWindow, new[] { checkViewMapWindow }),
821818
(pbRetainers, new[] { checkRetainers }),
822819
(pbGraduatedRelease, new[] { checkGraduatedRelease }),
823820
(pbBrakePipeChargingRate, new[] { lBrakePipeChargingRate }),
@@ -855,11 +852,6 @@ private void HelpIcon_Click(object sender, EventArgs _)
855852
pbControlConfirmations,
856853
baseUrl + "/options.html#control-confirmations"
857854
},
858-
{
859-
pbMapWindow,
860-
// This URL is temporary, waiting for https://open-rails.readthedocs.io to be updated to match the Manual in PDF format.
861-
baseUrl + "/options.html#dispatcher-window"
862-
},
863855
{
864856
pbRetainers,
865857
baseUrl + "/options.html#retainer-valve-on-all-cars"

Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs

Lines changed: 61 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -165,28 +165,74 @@ public DispatchViewer(Simulator simulator, Viewer viewer)
165165

166166
this.simulator = simulator;
167167
this.Viewer = viewer;
168-
TimetableWindow = new TimetableWindow(this);
168+
TimetableWindow = new TimetableWindow(this);
169169

170-
nodes = simulator.TDB.TrackDB.TrackNodes;
170+
nodes = simulator.TDB.TrackDB.TrackNodes;
171171

172172
// initialise the timer used to handle user input
173173
UITimer = new Timer();
174174
UITimer.Interval = 100;
175175
UITimer.Tick += new System.EventHandler(UITimer_Tick);
176176
UITimer.Start();
177+
}
178+
179+
public int RedrawCount;
180+
public Font trainFont;
181+
public Font sidingFont;
182+
public Font PlatformFont;
183+
public Font SignalFont;
184+
public SolidBrush trainBrush;
185+
public SolidBrush sidingBrush;
186+
public SolidBrush PlatformBrush;
187+
public SolidBrush SignalBrush;
188+
public SolidBrush InactiveTrainBrush;
189+
190+
private double lastUpdateTime;
191+
192+
/// <summary>
193+
/// When the user holds down the "L", "R", "U", "D" buttons,
194+
/// shift the view. Avoids the case when the user has to click
195+
/// buttons like crazy.
196+
/// </summary>
197+
/// <param name="sender"></param>
198+
/// <param name="e"></param>
199+
void UITimer_Tick(object sender, EventArgs e)
200+
{
201+
if (Viewer.DebugViewerEnabled == false) // Ctrl+9 sets this true to initialise the window and make it visible
202+
{
203+
this.Visible = false;
204+
firstShow = true;
205+
return;
206+
}
177207

178-
ViewWindow = new RectangleF(0, 0, 5000f, 5000f);
179-
windowSizeUpDown.Accelerations.Add(new NumericUpDownAcceleration(1, 100));
180-
boxSetSignal.Items.Add("System Controlled");
181-
boxSetSignal.Items.Add("Stop");
182-
boxSetSignal.Items.Add("Approach");
183-
boxSetSignal.Items.Add("Proceed");
184-
chkAllowUserSwitch.Checked = false;
185-
selectedTrainList = new List<Train>();
186-
if (MultiPlayer.MPManager.IsMultiPlayer()) { MultiPlayer.MPManager.AllowedManualSwitch = false; }
208+
if (firstShow)
209+
{
210+
InitializeWindow();
211+
}
212+
this.Visible = true;
187213

188-
InitData();
189-
InitImage();
214+
if (Program.Simulator.GameTime - lastUpdateTime < 1)
215+
return;
216+
217+
lastUpdateTime = Program.Simulator.GameTime;
218+
219+
GenerateView();
220+
}
221+
222+
private void InitializeWindow()
223+
{
224+
ViewWindow = new RectangleF(0, 0, 5000f, 5000f);
225+
windowSizeUpDown.Accelerations.Add(new NumericUpDownAcceleration(1, 100));
226+
boxSetSignal.Items.Add("System Controlled");
227+
boxSetSignal.Items.Add("Stop");
228+
boxSetSignal.Items.Add("Approach");
229+
boxSetSignal.Items.Add("Proceed");
230+
chkAllowUserSwitch.Checked = false;
231+
selectedTrainList = new List<Train>();
232+
if (MultiPlayer.MPManager.IsMultiPlayer()) { MultiPlayer.MPManager.AllowedManualSwitch = false; }
233+
234+
InitData();
235+
InitImage();
190236

191237
/*
192238
if (MultiPlayer.MPManager.IsMultiPlayer())
@@ -213,40 +259,8 @@ public DispatchViewer(Simulator simulator, Viewer viewer)
213259
tWindow.SelectedIndex = (MPManager.IsMultiPlayer()) ? 0 : 1;
214260
TimetableWindow.SetControls();
215261
}
216-
217-
public int RedrawCount;
218-
public Font trainFont;
219-
public Font sidingFont;
220-
public Font PlatformFont;
221-
public Font SignalFont;
222-
public SolidBrush trainBrush;
223-
public SolidBrush sidingBrush;
224-
public SolidBrush PlatformBrush;
225-
public SolidBrush SignalBrush;
226-
public SolidBrush InactiveTrainBrush;
227-
228-
private double lastUpdateTime;
229-
230-
/// <summary>
231-
/// When the user holds down the "L", "R", "U", "D" buttons,
232-
/// shift the view. Avoids the case when the user has to click
233-
/// buttons like crazy.
234-
/// </summary>
235-
/// <param name="sender"></param>
236-
/// <param name="e"></param>
237-
void UITimer_Tick(object sender, EventArgs e)
238-
{
239-
if (Viewer.DebugViewerEnabled == false) { this.Visible = false; firstShow = true; return; }
240-
else this.Visible = true;
241-
242-
if (Program.Simulator.GameTime - lastUpdateTime < 1) return;
243-
lastUpdateTime = Program.Simulator.GameTime;
244-
245-
GenerateView();
246-
}
247-
248-
#region initData
249-
private void InitData()
262+
#region initData
263+
private void InitData()
250264
{
251265
if (!loaded)
252266
{

0 commit comments

Comments
 (0)