From a4e85eab5100c62de6b73a93ab0e2f29eeb32840 Mon Sep 17 00:00:00 2001 From: Rich Dunne Date: Sun, 6 Sep 2020 14:25:21 -0600 Subject: [PATCH] Updated reference names based on refactorings. Added check during waypoint blip creation whether blips are enabled in order to set the correct blip.Alpha --- SceneManager/Menus/PathCreationMenu.cs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/SceneManager/Menus/PathCreationMenu.cs b/SceneManager/Menus/PathCreationMenu.cs index 27020fe..96910ca 100644 --- a/SceneManager/Menus/PathCreationMenu.cs +++ b/SceneManager/Menus/PathCreationMenu.cs @@ -73,7 +73,7 @@ namespace SceneManager { AddNewPathToPathsCollection(PathMainMenu.GetPaths(), 0); - if (SettingsMenu.debugGraphics.Checked) + if (SettingsMenu.threeDWaypoints.Checked) { DebugGraphics.LoopToDrawDebugGraphics(PathMainMenu.GetPaths()[0]); } @@ -82,7 +82,7 @@ namespace SceneManager { AddNewPathToPathsCollection(PathMainMenu.GetPaths(), PathMainMenu.GetPaths().IndexOf(PathMainMenu.GetPaths().Where(p => p.State == State.Finished).First()) + 1); - if (SettingsMenu.debugGraphics.Checked) + if (SettingsMenu.threeDWaypoints.Checked) { DebugGraphics.LoopToDrawDebugGraphics(PathMainMenu.GetPaths().Where(p => p != null && p.State == State.Creating).First()); } @@ -206,7 +206,7 @@ namespace SceneManager private static float SetDriveSpeedForWaypoint() { float convertedSpeed; - if (SettingsMenu.speedUnits.SelectedItem == SettingsMenu.SpeedUnitsOfMeasure.MPH) + if (SettingsMenu.speedUnits.SelectedItem == SpeedUnits.MPH) { //Game.LogTrivial($"Original speed: {waypointSpeeds[waypointSpeed.Index]}{SettingsMenu.speedUnits.SelectedItem}"); convertedSpeed = MathHelper.ConvertMilesPerHourToMetersPerSecond(waypointSpeed.Value); @@ -244,14 +244,10 @@ namespace SceneManager blip.Color = Color.Green; } - //if (PathMainMenu.GetPaths()[pathIndex].Waypoints.Count == 0) - //{ - // blip.Color = Color.Orange; - //} - //else - //{ - // blip.Color = Color.Yellow; - //} + if (!SettingsMenu.mapBlips.Checked) + { + blip.Alpha = 0f; + } return blip; }