private void CreateNewCanvas(string name) { HUDCanvas settings = new HUDCanvas(); if (string.IsNullOrEmpty(name) || string.IsNullOrWhiteSpace(name)) { name = "New Canvas"; } settings.Name = name; canvasUtility.RegisterNewCanvas(settings, hudConfig.OtherCanvasSettings.Count); hudConfig.OtherCanvasSettings.Add(settings); mainConfig.HUDConfig = hudConfig; RefreshData(); }
private void CurrentlyEditing_OnCanvasSettingsChanged() { canvasUtility.UnregisterCanvas(canvasID); canvasUtility.CreateCanvasWithConfig(currentlyEditing); if (currentlyEditing.IsMainCanvas) { hudConfig.MainCanvasSettings = currentlyEditing; } else { hudConfig.OtherCanvasSettings.RemoveAt(canvasID); hudConfig.OtherCanvasSettings.Insert(canvasID, currentlyEditing); } mainConfig.HUDConfig = hudConfig; canvasUtility.RegisterNewCanvas(currentlyEditing, canvasID); flowCoordinator.Value.RefreshAllMockCounters(); }