-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUIDBConfig.gd
More file actions
139 lines (117 loc) · 3.88 KB
/
UIDBConfig.gd
File metadata and controls
139 lines (117 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
## File path for all UIPanels
const UI_PANEL_LOCATION: String = "res://panels/"
## File path for all UIPanels
const UI_POPUP_LOCATION: String = "res://panels/popups/"
## File path for all UIComponents
const UI_COMPONENT_LOCATION: String = "res://components/"
## File path for all UIPanels
const DATA_INPUT_LOCATION: String = "res://components/DataInputs/"
## File path for all UIPanels
const ICON_LOCATION: String = "res://assets/icons/"
## All user defined UIPanels
static var panels: Dictionary[String, PackedScene] = {
"UIDesk": load(_p("UIDesk")),
"UIFunctions": load(_p("UIFunctions")),
"UIPlaybacks": load(_p("UIPlaybacks")),
"UIUniverses": load(_p("UIUniverses")),
"UIFixtures": load(_p("UIFixtures")),
"UIFixtureGroups": load(_p("UIFixtureGroups")),
"UISettings": load(_p("UISettings")),
"UISaveLoad": load(_p("UISaveLoad")),
"UICore": load(_p("UICore")),
"UIDebug": load(_p("UIDebug")),
"UIVirtualFixtures": load(_p("UIVirtualFixtures")),
"UIProgrammer": load(_p("UIProgrammer")),
"UIColorPicker": load(_p("UIColorPicker")),
"UIClock": load(_p("UIClock")),
"UICuePlayback": load(_p("UICuePlayback")),
"UIColorBlock": load(_p("UIColorBlock")),
"UICueSheet": load(_p("UICueSheet")),
"UIDataEditor": load(_p("UIDataEditor")),
}
## All user defined UIPanels
static var popups: Dictionary[String, PackedScene]
## All user defined UIPanels
static var components: Dictionary[String, PackedScene]
## All user defined UIPanels
static var data_inputs: Dictionary[Data.Type, Variant] = {
Data.Type.OBJECT: {
Data.Sub.Type.NULL: load(CoreUIDB._d("DataInputObject")),
Data.Sub.Type.OBJECT_FIXTUREMANIFEST: load(_d("DataInputFixtureManifest")),
}
}
## All user defined UIPanels
static var class_icons: Dictionary[String, Texture2D] = {
"NetworkManager": load(_i("Network")),
"Network": load(_i("Network")),
"Constellation": load(_i("Graph3")),
"Universe": load(_i("Universe")),
"Fixture": load(_i("Fixture")),
"DMXFixture": load(_i("DMXFixture")),
"Function": load(_i("Function")),
"CueList": load(_i("CueList")),
"Scene": load(_i("Scene")),
"FunctionGroup": load(_i("FunctionGroup")),
"DMXOutput": load(_i("DMXOutput")),
"ArtNetOutput": load(_i("ArtNet")),
"FixtureGroup": load(_i("FixtureGroup")),
"TriggerBlock": load(_i("TriggerBlock")),
}
## Categorys of the user defined panels
static var panels_by_category: Dictionary[String, Array] = {
"System": [
"UISettings",
"UISaveLoad",
"UICore",
"UIComponentSettings",
],
"Playbacks": [
"UIPlaybacks",
"UICuePlayback",
],
"Programming": [
"UIProgrammer",
"UIColorPicker",
"UICueSheet",
"UIDataEditor",
],
"Components": [
"UIUniverses",
"UIFunctions",
"UIFixtures",
"UIFixtureGroups"
],
"Views": [
"UIVirtualFixtures",
"UIDesk",
],
"Utils": [
"UIClock",
"UIDebug",
"UIColorBlock",
]
}
## Config
static var config: Dictionary[String, Variant] = {
"panels": panels,
"popups": popups,
"components": components,
"data_inputs": data_inputs,
"class_icons": class_icons,
"panels_by_category": panels_by_category
}
## Returns the file path of a UIPanel
static func _p(p_panel_class: String) -> String:
return str(UI_PANEL_LOCATION, p_panel_class, "/", p_panel_class, ".tscn")
## Returns the file path of a UIPopup
static func _u(p_popup_class: String) -> String:
return str(UI_POPUP_LOCATION, p_popup_class, "/", p_popup_class, ".tscn")
## Returns the file path of a UIComponent
static func _c(p_component_class: String) -> String:
return str(UI_COMPONENT_LOCATION, p_component_class, "/", p_component_class, ".tscn")
## Returns the file path of a DataInput
static func _d(p_data_input_class: String) -> String:
return str(DATA_INPUT_LOCATION, p_data_input_class, "/", p_data_input_class, ".tscn")
## Returns the file path of a Icon
static func _i(p_data_input_class: String) -> String:
return str(ICON_LOCATION, p_data_input_class, ".svg")