public static void UpdateOverlays(CanvasObject obj) { if (!OverlayMenuTypes.Exists(obj)) { return; } for (int i = 0; i < popups.Count; i++) { if (popups[i].Compare(obj)) { popups.RemoveAt(i); return; } if (popups[i].Compare(obj.GetType()) && !OverlayMenuTypes.AllowMultiple(obj)) { popups.RemoveAt(i); } } IOverlayMenu menu = OverlayMenuTypes.GetMenu(obj); if (menu == null) { return; } popups.Add(menu); OverlayMenuTypes.Sort(popups); }
public static void InitCanvas() { ResourceManager.SetupPaths(); CanvasGUI.SetupGUI(); NodeTypes.FetchAllNodes(); NoduleTypes.FetchAllNodules(); OverlayMenuTypes.FetchAllOverlayMenus(); InputSystem.SetupInputHandlers(); }