..

server_form.json

1{
2	"namespace": "server_form",
3	"$schema": "https://kalmemarq.github.io/Bugrock-JSON-UI-Schemas/ui.schema.json",
4
5	"long_form": {
6		"type": "panel",
7		"size": ["100%", "100%"],
8		"controls": [
9			{
10				"default_long_form@common_dialogs.main_panel_no_buttons": {
11					"$title_panel": "common_dialogs.standard_title_label",
12					"$title_size": ["100% - 14px", 10],
13					"size": [225, 200],
14					"$text_name": "#title_text",
15					"$title_text_binding_type": "none",
16					"$child_control": "server_form.long_form_panel",
17					"layer": 2,
18					"bindings": [
19						{
20							"binding_name": "#title_text"
21						},
22						{
23							"binding_type": "view",
24							"source_property_name": "((#title_text - 'Custom Form') = #title_text)",
25							"target_property_name": "#visible"
26						}
27					]
28				}
29			},
30			{
31				"cutsom_long_form@common_dialogs.main_panel_no_buttons": {
32					"$title_panel": "common_dialogs.standard_title_label",
33					"$title_size": ["100% - 14px", 10],
34					"size": [360, 192.5],
35					"$text_name": "#title_text",
36					"$title_text_binding_type": "none",
37					"$child_control": "server_form.my_super_custom_panel_main",
38					"layer": 2,
39					"bindings": [
40						{
41							"binding_name": "#title_text"
42						},
43						{
44							"binding_type": "view",
45							"source_property_name": "(#title_text = 'Custom Form')",
46							"target_property_name": "#visible"
47						}
48					]
49				}
50			}
51		]
52	},
53
54	"my_super_custom_panel_main": {
55		"type": "stack_panel",
56		"size": ["100%", "100%"],
57		"orientation": "vertical",
58		"layer": 1,
59		"anchor_from": "top_left",
60		"anchor_to": "top_left",
61		"controls": [
62			{
63				"scrolling_panel@common.scrolling_panel": {
64					"anchor_to": "top_left",
65					"anchor_from": "top_left",
66					"$show_background": false,
67					"size": ["100%", "100%"],
68					"$scrolling_content": "server_form.my_super_custom_panel",
69					"$scroll_size": [5, "100% - 4px"],
70					"$scrolling_pane_size": ["100% - 4px", "100% - 2px"],
71					"$scrolling_pane_offset": [2, 0],
72					"$scroll_bar_right_padding_size": [0, 0]
73				}
74			}
75		]
76	},
77
78	"my_super_custom_panel": {
79		"type": "panel",
80		"size": ["100%", "100%c"],
81		"controls": [
82			{
83				"long_form_dynamic_buttons_panel": {
84					"type": "grid",
85					"size": ["100%", "100%c"],
86					"grid_dimensions": [3, 3],
87					"grid_item_template": "server_form.custom_button",
88					"grid_fill_direction": "horizontal",
89					"grid_rescaling_type": "horizontal",
90					"anchor_from": "center",
91					"anchor_to": "center",
92
93					"factory": {
94						"name": "buttons",
95						"control_name": "server_form.custom_button"
96					},
97
98					"collection_name": "form_buttons",
99					"bindings": [
100						{
101							"binding_name": "#form_button_length",
102							"binding_name_override": "#maximum_grid_items"
103						}
104					]
105				}
106			}
107		]
108	},
109	"custom_button": {
110		"type": "panel",
111		"size": [80, 80],
112		"controls": [
113			{
114				"main_ui": {
115					"type": "panel",
116					"size": [64, 64],
117					"controls": [
118						{
119							"panel_name": {
120								"type": "panel",
121								"size": [64, 64],
122								"bindings": [
123									{
124										"binding_type": "view",
125										"source_control_name": "image",
126										"resolve_sibling_scope": true,
127										"source_property_name": "(not (#texture = ''))",
128										"target_property_name": "#visible"
129									}
130								],
131
132								"controls": [
133									{
134										"image": {
135											"type": "image",
136											"layer": 200,
137											"size": [32, 32],
138											"offset": [0, -5],
139											"bindings": [
140												{
141													"binding_name": "#form_button_texture",
142													"binding_name_override": "#texture",
143													"binding_type": "collection",
144													"binding_collection_name": "form_buttons"
145												},
146												{
147													"binding_name": "#form_button_texture_file_system",
148													"binding_name_override": "#texture_file_system",
149													"binding_type": "collection",
150													"binding_collection_name": "form_buttons"
151												},
152												{
153													"binding_type": "view",
154													"source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
155													"target_property_name": "#visible"
156												}
157											]
158										}
159									},
160									{
161										"text": {
162											"type": "label",
163											"text": "#form_button_text",
164											"layer": 32,
165											"color": [0, 0, 0],
166											"offset": [0, -8],
167											"anchor_from": "bottom_middle",
168											"bindings": [
169												{
170													"binding_name": "#form_button_text",
171													"binding_type": "collection",
172													"binding_collection_name": "form_buttons"
173												}
174											]
175										}
176									}
177								]
178							}
179						},
180						{
181							"form_button@common_buttons.light_text_button": {
182								"$pressed_button_name": "button.form_button_click",
183								"anchor_from": "top_left",
184								"anchor_to": "top_left",
185								"size": [64, 64],
186								"$button_text": "#null",
187								"$button_text_binding_type": "collection",
188								"$button_text_grid_collection_name": "form_buttons",
189								"$button_text_max_size": ["100%", 20],
190								"bindings": [
191									{
192										"binding_type": "collection_details",
193										"binding_collection_name": "form_buttons"
194									}
195								]
196							}
197						}
198					]
199				}
200			}
201		]
202	}
203}
204

Not Affiliated With Mojang Or Microsoft