public static void Init() { // Build the initial menu Main.MenuPool.Add(PhotoMenu = new PhotoMenu()); Main.MenuPool.Add(StatisticsMenu = new StatisticsMenu()); Main.MenuPool.Add(RCMenu = new RCMenu()); Main.MenuPool.Add(SpawnMenu = new SpawnMenu()); Main.MenuPool.Add(SpawnMenuContext = new SpawnMenu()); Main.MenuPool.Add(PresetsMenu = new PresetsMenu()); Main.MenuPool.Add(TimeMachineMenu = new TimeMachineMenu()); Main.MenuPool.Add(TrainMissionMenu = new TrainMissionMenu()); }
public static void Process() { if (Game.IsControlPressed(Control.CharacterWheel) && Game.IsControlPressed(Control.VehicleHandbrake) && !Main.MenuPool.IsAnyMenuOpen() && !TcdEditer.IsEditing) { if (DeloreanHandler.CurrentTimeMachine != null) { if (DeloreanHandler.CurrentTimeMachine.Circuits.IsTimeTraveling || DeloreanHandler.CurrentTimeMachine.Circuits.IsReentering) { return; } } OpenMenu(); } if (DeloreanHandler.CurrentTimeMachine == null) { if (TimeMachineMenu.Visible) { TimeMachineMenu.Visible = false; } if (PhotoMenu.Visible) { PhotoMenu.Visible = false; } if (SpawnMenuContext.Visible) { SpawnMenuContext.Visible = false; } } if (DeloreanHandler.CurrentTimeMachine != null) { if (RCMenu.Visible) { RCMenu.Visible = false; } if (StatisticsMenu.Visible) { StatisticsMenu.Visible = false; } } if (Main.MenuPool.IsAnyMenuOpen()) { if (RCMenu.Visible) { RCMenu.Process(); } if (TimeMachineMenu.Visible) { TimeMachineMenu.Process(); } if (PresetsMenu.Visible) { PresetsMenu.Process(); } if (StatisticsMenu.Visible) { StatisticsMenu.Process(); } if (PhotoMenu.Visible) { PhotoMenu.Process(); } } }