-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIDBConfig.gd
More file actions
88 lines (66 loc) · 2.64 KB
/
Copy pathUIDBConfig.gd
File metadata and controls
88 lines (66 loc) · 2.64 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
## 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("res://modules/UIConstellationManager/panels/UIConstellationManager.tscn"),
}
## 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_script: Script) -> String:
var panel_class: String = p_panel_script.get_global_name()
return str(UI_PANEL_LOCATION, panel_class, "/", panel_class, ".tscn")
## Returns the file path of a UIPopup
static func _u(p_popup_script: Script) -> String:
var popup_class: String = p_popup_script.get_global_name()
return str(UI_POPUP_LOCATION, popup_class, "/", popup_class, ".tscn")
## Returns the file path of a UIComponent
static func _c(p_component_script: Script) -> String:
var component_class: String = p_component_script.get_global_name()
return str(UI_COMPONENT_LOCATION, component_class, "/", component_class, ".tscn")
## Returns the file path of a DataInput
static func _d(p_data_input_script: Script) -> String:
var data_input_class: String = p_data_input_script.get_global_name()
return str(DATA_INPUT_LOCATION, data_input_class, "/", 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")