Skip to content

Commit 0599e6c

Browse files
committed
F9 also closes the TrainCarOperationsViewer window.
1 parent bc27ad2 commit 0599e6c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Source/RunActivity/Viewer3D/Viewer.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,22 @@ void HandleUserInput(ElapsedTime elapsedTime)
10121012
}
10131013
if (UserInput.IsPressed(UserCommand.DisplaySwitchWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) SwitchWindow.TabAction(); else SwitchWindow.Visible = !SwitchWindow.Visible;
10141014
if (UserInput.IsPressed(UserCommand.DisplayTrainOperationsWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainOperationsWindow.TabAction(); else { TrainOperationsWindow.Visible = !TrainOperationsWindow.Visible; if (!TrainOperationsWindow.Visible) CarOperationsWindow.Visible = false; }
1015-
if (UserInput.IsPressed(UserCommand.DisplayTrainCarOperationsWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainCarOperationsWindow.TabAction(); else { TrainCarOperationsWindow.Visible = !TrainCarOperationsWindow.Visible; if (!TrainCarOperationsWindow.Visible) CarOperationsWindow.Visible = false; }
1015+
1016+
if (UserInput.IsPressed(UserCommand.DisplayTrainCarOperationsWindow))
1017+
{
1018+
if (UserInput.IsDown(UserCommand.DisplayNextWindowTab))
1019+
TrainCarOperationsWindow.TabAction();
1020+
else
1021+
{
1022+
TrainCarOperationsWindow.Visible = !TrainCarOperationsWindow.Visible;
1023+
if (!TrainCarOperationsWindow.Visible)
1024+
{
1025+
TrainCarOperationsViewerWindow.Visible = false;
1026+
CarOperationsWindow.Visible = false;
1027+
}
1028+
}
1029+
}
1030+
10161031
if (UserInput.IsPressed(UserCommand.DisplayTrainDpuWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainDpuWindow.Visible = !TrainDpuWindow.Visible ; else TrainDpuWindow.TabAction();
10171032
if (UserInput.IsPressed(UserCommand.DisplayNextStationWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) NextStationWindow.TabAction(); else NextStationWindow.Visible = !NextStationWindow.Visible;
10181033
if (UserInput.IsPressed(UserCommand.DisplayCompassWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) CompassWindow.TabAction(); else CompassWindow.Visible = !CompassWindow.Visible;

0 commit comments

Comments
 (0)