Skip to content

Commit 275dd6c

Browse files
Color button Alerter blink-red when Alerter sounds
1 parent 01614a1 commit 275dd6c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"profiles": {
3+
"RunActivity": {
4+
"commandName": "Project",
5+
"commandLineArgs": "-start -exploreactivity \"D:\\OpenRails\\Demo Model 1\\Demo Model 1\\ROUTES\\SCE\\PATHS\\MT_MT_0930 Edinburgh-Glasgow Queen Street(player) - original.PAT\" \"D:\\OpenRails\\Demo Model 1\\Demo Model 1\\TRAINS\\CONSISTS\\MT_MT_Class 27 102 & 6 mk2 PP.CON\" 12:00 1 0"
6+
}
7+
}
8+
}

Source/RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelStatus.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,18 @@ private static void getStatusControlEmergencyPushButton(ref SwitchOnPanelStatus
178178
}
179179
}
180180

181+
private static void getStatusControlAlerterPushButton(ref SwitchOnPanelStatus switchOnPanelStatus)
182+
{
183+
MSTSLocomotive locomotive = Viewer.PlayerLocomotive as MSTSLocomotive;
184+
185+
if (locomotive.AlerterSnd)
186+
{
187+
switchOnPanelStatus.Status = "Alerter";
188+
switchOnPanelStatus.Color = "red";
189+
switchOnPanelStatus.Blinking = true;
190+
}
191+
}
192+
181193
private static void getStatusGameControlMode(ref SwitchOnPanelStatus switchOnPanelStatus)
182194
{
183195
switch (Viewer.PlayerTrain.ControlMode)
@@ -505,6 +517,9 @@ public static void getStatus(UserCommand userCommand, ref SwitchOnPanelStatus sw
505517
case UserCommand.ControlEmergencyPushButton:
506518
getStatusControlEmergencyPushButton(ref switchOnPanelStatus);
507519
break;
520+
case UserCommand.ControlAlerter:
521+
getStatusControlAlerterPushButton(ref switchOnPanelStatus);
522+
break;
508523
case UserCommand.GameSwitchManualMode:
509524
getStatusGameControlMode(ref switchOnPanelStatus);
510525
break;

0 commit comments

Comments
 (0)