mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Fixed references from path name refactor
This commit is contained in:
parent
7a5ffe3317
commit
f415c2b69e
1 changed files with 6 additions and 3 deletions
|
|
@ -4,8 +4,9 @@ using System.Linq;
|
||||||
using Rage;
|
using Rage;
|
||||||
using RAGENativeUI;
|
using RAGENativeUI;
|
||||||
using RAGENativeUI.Elements;
|
using RAGENativeUI.Elements;
|
||||||
using SceneManager.Objects;
|
using SceneManager.Managers;
|
||||||
using SceneManager.Utils;
|
using SceneManager.Utils;
|
||||||
|
using SceneManager.Waypoints;
|
||||||
|
|
||||||
namespace SceneManager.Menus
|
namespace SceneManager.Menus
|
||||||
{
|
{
|
||||||
|
|
@ -38,7 +39,7 @@ namespace SceneManager.Menus
|
||||||
internal static void BuildEditWaypointMenu()
|
internal static void BuildEditWaypointMenu()
|
||||||
{
|
{
|
||||||
Menu.MenuItems.Clear();
|
Menu.MenuItems.Clear();
|
||||||
var currentPath = PathManager.Paths[PathMainMenu.EditPath.Value-1];
|
var currentPath = PathManager.Paths.FirstOrDefault(x => x.Name == PathMainMenu.EditPath.OptionText);
|
||||||
|
|
||||||
Menu.AddItem(EditWaypoint = new UIMenuNumericScrollerItem<int>("Edit Waypoint", "", currentPath.Waypoints.First().Number, currentPath.Waypoints.Last().Number, 1));
|
Menu.AddItem(EditWaypoint = new UIMenuNumericScrollerItem<int>("Edit Waypoint", "", currentPath.Waypoints.First().Number, currentPath.Waypoints.Last().Number, 1));
|
||||||
EditWaypoint.Index = 0;
|
EditWaypoint.Index = 0;
|
||||||
|
|
@ -84,6 +85,7 @@ namespace SceneManager.Menus
|
||||||
AddNewWaypoint.ForeColor = Color.Gold;
|
AddNewWaypoint.ForeColor = Color.Gold;
|
||||||
|
|
||||||
EditPathMenu.Menu.Visible = false;
|
EditPathMenu.Menu.Visible = false;
|
||||||
|
|
||||||
Menu.RefreshIndex();
|
Menu.RefreshIndex();
|
||||||
Menu.Visible = true;
|
Menu.Visible = true;
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +154,8 @@ namespace SceneManager.Menus
|
||||||
|
|
||||||
private static void EditWaypoint_OnItemSelected(UIMenu sender, UIMenuItem selectedItem, int index)
|
private static void EditWaypoint_OnItemSelected(UIMenu sender, UIMenuItem selectedItem, int index)
|
||||||
{
|
{
|
||||||
var currentPath = PathManager.Paths[PathMainMenu.EditPath.Index];
|
//var currentPath = PathManager.Paths[PathMainMenu.EditPath.Index];
|
||||||
|
var currentPath = PathManager.Paths.FirstOrDefault(x => x.Name == PathMainMenu.EditPath.OptionText);
|
||||||
|
|
||||||
if (selectedItem == UpdateWaypoint)
|
if (selectedItem == UpdateWaypoint)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue