A game about forced loneliness, made by TACStudios
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using UnityEngine;
5using UnityEngine.UIElements;
6using UnityEditor;
7using UnityEditor.Experimental.GraphView;
8
9namespace UnityEditor.ShaderGraph.Drawing
10{
11 class BlackboardViewModel : ISGViewModel
12 {
13 public GraphData model { get; set; }
14 public VisualElement parentView { get; set; }
15 public string title { get; set; }
16 public string subtitle { get; set; }
17 public Dictionary<string, IGraphDataAction> propertyNameToAddActionMap { get; set; }
18 public Dictionary<string, IGraphDataAction> defaultKeywordNameToAddActionMap { get; set; }
19 public Dictionary<string, IGraphDataAction> builtInKeywordNameToAddActionMap { get; set; }
20 public Tuple<string, IGraphDataAction> defaultDropdownNameToAdd { get; set; }
21
22 public IGraphDataAction addCategoryAction { get; set; }
23 public Action<IGraphDataAction> requestModelChangeAction { get; set; }
24 public List<CategoryData> categoryInfoList { get; set; }
25
26 // Can't add disbled keywords, so don't need an add action
27 public List<string> disabledKeywordNameList { get; set; }
28 public List<string> disabledDropdownNameList { get; set; }
29
30 public BlackboardViewModel()
31 {
32 propertyNameToAddActionMap = new Dictionary<string, IGraphDataAction>();
33 defaultKeywordNameToAddActionMap = new Dictionary<string, IGraphDataAction>();
34 builtInKeywordNameToAddActionMap = new Dictionary<string, IGraphDataAction>();
35 defaultDropdownNameToAdd = null;
36 categoryInfoList = new List<CategoryData>();
37 disabledKeywordNameList = new List<string>();
38 disabledDropdownNameList = new List<string>();
39 }
40
41 public void ResetViewModelData()
42 {
43 subtitle = String.Empty;
44 propertyNameToAddActionMap.Clear();
45 defaultKeywordNameToAddActionMap.Clear();
46 builtInKeywordNameToAddActionMap.Clear();
47 defaultDropdownNameToAdd = null;
48 categoryInfoList.Clear();
49 disabledKeywordNameList.Clear();
50 disabledDropdownNameList.Clear();
51 requestModelChangeAction = null;
52 }
53 }
54}