mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Extracted blip opacity code to new method within Path class as part of Path class refactor
This commit is contained in:
parent
42acd1c56a
commit
24f3c70474
1 changed files with 5 additions and 22 deletions
|
|
@ -40,33 +40,16 @@ namespace SceneManager
|
|||
{
|
||||
if (checkboxItem == togglePath)
|
||||
{
|
||||
var currentPath = TrafficMenu.paths[TrafficMenu.editPath.Index];
|
||||
if (togglePath.Checked)
|
||||
{
|
||||
TrafficMenu.paths[TrafficMenu.editPath.Index].PathDisabled = true;
|
||||
Game.LogTrivial($"Path {TrafficMenu.paths[TrafficMenu.editPath.Index].PathNum} disabled.");
|
||||
|
||||
foreach (Waypoint wd in TrafficMenu.paths[TrafficMenu.editPath.Index].Waypoint)
|
||||
{
|
||||
wd.Blip.Alpha = 0.5f;
|
||||
if (wd.CollectorRadiusBlip)
|
||||
{
|
||||
wd.CollectorRadiusBlip.Alpha = 0.25f;
|
||||
}
|
||||
}
|
||||
currentPath.DisablePath();
|
||||
Game.LogTrivial($"Path {currentPath.PathNum} disabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
TrafficMenu.paths[TrafficMenu.editPath.Index].PathDisabled = false;
|
||||
Game.LogTrivial($"Path {TrafficMenu.paths[TrafficMenu.editPath.Index].PathNum} enabled.");
|
||||
|
||||
foreach (Waypoint wd in TrafficMenu.paths[TrafficMenu.editPath.Index].Waypoint)
|
||||
{
|
||||
wd.Blip.Alpha = 1.0f;
|
||||
if (wd.CollectorRadiusBlip)
|
||||
{
|
||||
wd.CollectorRadiusBlip.Alpha = 0.5f;
|
||||
}
|
||||
}
|
||||
currentPath.EnablePath();
|
||||
Game.LogTrivial($"Path {currentPath.PathNum} enabled.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue