-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIDBConfig.gd
More file actions
84 lines (62 loc) · 2.36 KB
/
UIDBConfig.gd
File metadata and controls
84 lines (62 loc) · 2.36 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
## 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] = {
"UICore": load(_p("UICore")),
"UIConstellationManager": load(_p("UIConstellationManager")),
}
## 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")),
}
}
## All user defined UIPanels
static var class_icons: Dictionary[String, Texture2D] = {
"NetworkManager": load(_i("Network")),
"Network": load(_i("Network")),
"Constellation": load(_i("Graph3")),
}
## Categorys of the user defined panels
static var panels_by_category: Dictionary[String, Array] = {
"System": [
"UICore",
"UIConstellationManager"
],
}
## 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")