From 0d6f5ae51a1881d56f3ca6a8a9eb567a4fdb8437 Mon Sep 17 00:00:00 2001 From: Rich Dunne Date: Sun, 6 Sep 2020 14:27:22 -0600 Subject: [PATCH] Updated reference names based on refactorings. Added conditions for blip opacity based on whether map blips are enabled in settings. --- SceneManager/Object Classes/Waypoint.cs | 33 +++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/SceneManager/Object Classes/Waypoint.cs b/SceneManager/Object Classes/Waypoint.cs index 1ead479..7f6623a 100644 --- a/SceneManager/Object Classes/Waypoint.cs +++ b/SceneManager/Object Classes/Waypoint.cs @@ -1,5 +1,6 @@ using Rage; using System.Drawing; +using System.Linq; namespace SceneManager { @@ -46,8 +47,15 @@ namespace SceneManager _collectorRadiusBlip = new Blip(waypointBlip.Position, collectorRadius) { Color = waypointBlip.Color, - Alpha = 0.5f }; + if (SettingsMenu.mapBlips.Checked) + { + _collectorRadiusBlip.Alpha = 0.5f; + } + else + { + _collectorRadiusBlip.Alpha = 0f; + } _enableWaypointMarker = true; } @@ -167,7 +175,7 @@ namespace SceneManager _enableWaypointMarker = false; GameFiber.StartNew(() => { - while (SettingsMenu.debugGraphics.Checked && !_enableWaypointMarker) + while (SettingsMenu.threeDWaypoints.Checked && !_enableWaypointMarker) { if (EditWaypointMenu.editWaypointMenu.Visible) { @@ -222,6 +230,27 @@ namespace SceneManager }); } + public void EnableBlip() + { + if(!PathMainMenu.GetPaths().Where(p => p.Number == _path).First().IsEnabled) + { + _blip.Alpha = 0.5f; + _collectorRadiusBlip.Alpha = 0.25f; + } + else + { + _blip.Alpha = 1.0f; + _collectorRadiusBlip.Alpha = 0.5f; + } + + } + + public void DisableBlip() + { + _blip.Alpha = 0; + _collectorRadiusBlip.Alpha = 0; + } + public void RemoveWaypoint() { _path = 0;