1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-23 12:26:14 +00:00
bedrock-samples/resource_pack/ui/manifest_validation_screen.json
Mike Ammerlaan a3b394c507 1.19.30
Initial layout
2022-09-23 06:24:26 -07:00

999 lines
35 KiB
JSON

{
"namespace": "manifest_validation",
//---------------------------------------------------------------------------
// ICONS
//---------------------------------------------------------------------------
"clipboard_icon": {
"layer": 1,
"type": "image",
"texture": "textures/ui/copy",
"size": [ 13, 14 ]
},
"clipboard_icon_wrapper": {
"type": "panel",
"size": [ "100% - 2px", "100% - 2px" ],
"controls": [
{
"icon@manifest_validation.clipboard_icon": {
}
}
]
},
"trash_icon": {
"layer": 1,
"type": "image",
"texture": "textures/ui/trash_default",
"size": [ 11, 12 ]
},
"trash_icon_wrapper": {
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100% - 2px", "100% - 2px" ],
"controls": [
{
"icon@manifest_validation.trash_icon": {
"bindings": [
{
"binding_name": "(not #is_deleting)",
"binding_name_override": "#visible"
}
]
}
},
{
"progress_loading_bars@manifest_validation.progress_loading_bars": {
"bindings": [
{
"binding_name": "#is_deleting",
"binding_name_override": "#visible"
}
]
}
}
]
},
"refresh_icon": {
"layer": 1,
"type": "image",
"texture": "textures/ui/refresh",
"size": [ 18, 14 ]
},
"refresh_icon_wrapper": {
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100% - 2px", "100% - 2px" ],
"controls": [
{
"icon@manifest_validation.refresh_icon": {
"bindings": [
{
"binding_name": "#is_done_validating",
"binding_name_override": "#visible"
}
]
}
},
{
"progress_loading_bars@manifest_validation.progress_loading_bars": {
"bindings": [
{
"binding_name": "(not #is_done_validating)",
"binding_name_override": "#visible"
}
]
}
}
]
},
//---------------------------------------------------------------------------
// CONTROLS
//---------------------------------------------------------------------------
"section_divider": {
"type": "panel",
"size": [ "100% - 5px", "100%c" ],
"controls": [
{
"divider_image": {
"type": "image",
"size": [ "100%", 1 ],
"texture": "textures/ui/divider3",
"tiled": "x",
"alpha": 0.4
}
}
]
},
"text_label": {
"type": "label",
"color": "$main_header_text_color",
"size": [ "default", "default" ],
"layer": 1,
"text": "$text_label",
"bindings": [
{
"binding_name": "$text_label",
"binding_condition": "visible"
}
]
},
"icon_image": {
"type": "image",
"$icon_collection_name": "none",
"layer": 8,
"bindings": [
{
"binding_name": "#icon_path",
"binding_name_override": "#texture",
"binding_condition": "visible"
},
{
"binding_name": "#icon_zip",
"binding_name_override": "#zip_folder",
"binding_condition": "visible"
},
{
"binding_name": "#icon_file_system",
"binding_name_override": "#texture_file_system",
"binding_condition": "visible"
}
]
},
"progress_loading_bars": {
"type": "image",
"layer": 1,
"texture": "textures/ui/loading_bar",
"offset": [ 0, 8 ],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"size": [ 16, 8 ],
"uv_size": [ 64, 8 ],
"uv": "@common.bar_animation",
"color": [ 0.7, 0.7, 0.7, 1.0 ]
},
"background": {
"type": "image",
"texture": "textures/ui/BannersLight"
},
"black_background_fill@resource_packs.black_image": {},
"error_pack_secondary_layout": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"black@manifest_validation.background": {
"layer": 1,
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "100%c" ],
"controls": [
{
"stack_panel": {
"layer": 1,
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "100%c + 2px" ],
"controls": [
{
"stack_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", 50 ],
"controls": [
{
"icon_background@manifest_validation.black_background_fill": {
"layer": 1,
"size": [ "100%c + 2px", "100%" ],
"controls": [
{
"icon@manifest_validation.icon_image": {
"layer": 1,
"size": [ 44, 44 ]
}
}
]
}
},
{
"pack_info": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"top": {
"type": "stack_panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"orientation": "horizontal",
"size": [ "100% - 5px", 10 ],
"offset": [ 2, 2 ],
"controls": [
{
"title@manifest_validation.text_label": {
"layer": 1,
"size": [ "fill", "100%" ],
"$text_label": "#pack_header_title"
}
},
{
"padding": {
"type": "panel",
"size": [ 2, "100%" ]
}
},
{
"pack_size@manifest_validation.text_label": {
"layer": 1,
"size": [ "default", "100%" ],
"$text_label": "#pack_header_size",
"bindings": [
{
"binding_name": "#pack_header_size_visible",
"binding_name_override": "#visible"
}
]
}
}
]
}
},
{
"bottom": {
"type": "stack_panel",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"orientation": "horizontal",
"size": [ "100% - 5px", 35 ],
"offset": [ 2, -1 ],
"controls": [
{
"description@manifest_validation.text_label": {
"layer": 1,
"size": [ "fill", 30 ],
"font_type": "smooth",
"$text_label": "#pack_header_description"
}
},
{
"padding": {
"type": "panel",
"size": [ 2, "100%" ]
}
}
]
}
}
]
}
},
{
"button_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ 80, "100%" ],
"controls": [
{
"top_pad": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"refresh": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"button@manifest_validation.refresh_text_button": {
"layer": 1
}
}
],
"bindings": [
{
"binding_name": "#refresh_visible",
"binding_name_override": "#visible",
"binding_condition": "once"
}
]
}
},
{
"pad": {
"type": "panel",
"size": [ "100%", 5 ]
}
},
{
"delete": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"button@manifest_validation.delete_text_button": {
"layer": 1
}
}
],
"bindings": [
{
"binding_name": "#delete_visible",
"binding_name_override": "#visible",
"binding_condition": "once"
}
]
}
}
]
}
},
{
"pad": {
"type": "panel",
"size": [ 3, "100%" ]
}
}
]
}
},
{
"secondary_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100% - 8px", "100%c + 4px" ],
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"controls": [
{
"padding_0@manifest_validation.section_divider": {}
},
{
"title_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%cm" ],
"controls": [
{
"title_text@common.minecraftTenLabel": {
"size": [ "default", "default" ],
"text": "manifestvalidation.packid",
"color": "$main_header_text_color"
}
},
{
"space": {
"type": "panel",
"size": [ 2, 2 ]
}
},
{
"offset": {
"type": "panel",
"size": [ "fill", "100%c" ],
"controls": [
{
"title@manifest_validation.text_label": {
"layer": 1,
"size": [ "100%", "default" ],
"offset": [ 0, 1 ],
"$text_label": "#pack_id",
"font_type": "smooth",
"font_scale_factor": 1.1
}
}
]
}
}
]
}
},
{
"pad_0": {
"type": "panel",
"size": [ "100%", 2 ]
}
},
{
"padding_1@manifest_validation.section_divider": {}
},
{
"version_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%cm" ],
"controls": [
{
"version_text@common.minecraftTenLabel": {
"size": [ "default", "default" ],
"text": "manifestvalidation.packversion",
"color": "$main_header_text_color"
}
},
{
"space": {
"type": "panel",
"size": [ 2, 2 ]
}
},
{
"offset": {
"type": "panel",
"size": [ "fill", "100%c" ],
"controls": [
{
"version@manifest_validation.text_label": {
"layer": 1,
"size": [ "100%", "default" ],
"offset": [ 0, 1 ],
"$text_label": "#pack_version",
"font_type": "smooth",
"font_scale_factor": 1.1
}
}
]
}
}
]
}
},
{
"pad_1": {
"type": "panel",
"size": [ "100%", 2 ]
}
},
{
"padding_2@manifest_validation.section_divider": {}
},
{
"path_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%cm" ],
"controls": [
{
"path_text@common.minecraftTenLabel": {
"size": [ "default", "default" ],
"text": "manifestvalidation.filelocation",
"color": "$main_header_text_color"
}
},
{
"space": {
"type": "panel",
"size": [ 2, 2 ]
}
},
{
"offset": {
"type": "panel",
"size": [ "fill", "100%c" ],
"controls": [
{
"description@manifest_validation.text_label": {
"layer": 1,
"size": [ "100%", "default" ],
"offset": [ 0, 1 ],
"font_type": "smooth",
"font_scale_factor": 1.1,
"$text_label": "#pack_path"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
},
"error_pack_content_layout": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"black@manifest_validation.background": {
"layer": 1,
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "100%c" ],
"controls": [
{
"error_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100% - 8px", "100%c + 8px" ],
"controls": [
{
"error_header_panel": {
"type": "panel",
"size": [ "100%", "100%cm + 2px" ],
"controls": [
{
"error_type_panel": {
"type": "label",
"size": [ "default", "default" ],
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"offset": [ 2, 2 ],
"text": "#error_type_label",
"font_type": "smooth",
"font_scale_factor": 1.2,
"color": "$main_header_text_color",
"bindings": [
{
"binding_collection_name": "pack_errors",
"binding_name": "#error_type_label",
"binding_type": "collection"
}
]
}
},
{
"button@manifest_validation.clipboard_button": {
"anchor_from": "right_middle",
"anchor_to": "right_middle",
"offset": [ -2, 2 ],
"bindings": [
{
"binding_name": "#has_errors_or_warnings",
"binding_name_override": "#visible"
},
{
"binding_collection_name": "pack_errors",
"binding_type": "collection_details"
}
]
}
}
]
}
},
{
"padding_0@manifest_validation.section_divider": {
"bindings": [
{
"binding_name": "#has_errors_or_warnings",
"binding_name_override": "#visible"
}
]
}
},
//TODO: integrate backend to have separate section for file name [Bug 249941]
//{
// "file_text_panel": {
// "type": "stack_panel",
// "orientation": "horizontal",
// "size": [ "100%", "100%cm" ],
// "controls": [
// {
// "file_text": {
// "type": "label",
// "size": [ "default", "default" ],
// "text": "manifestvalidation.file",
// "font_type": "MinecraftTen",
// "color": "$main_header_text_color"
// }
// },
// {
// "space": {
// "type": "panel",
// "size": [ 2, 2 ]
// }
// },
// {
// "offset": {
// "type": "panel",
// "size": [ "fill", "100%c" ],
// "controls": [
// {
// "file_label": {
// "type": "label",
// "color": "$main_header_text_color",
// "size": [ "100% - 8px", "default" ],
// "font_type": "smooth",
// "offset": [ 4, 4 ],
// "anchor_from": "top_left",
// "anchor_to": "top_left",
// "layer": 1,
// "shadow": false,
// "text": "#file_label",
// "bindings": [
// {
// "binding_name": "#file_label",
// "binding_condition": "visible"
// }
// ]
// }
// }
// ]
// }
// }
// ],
// "bindings": [
// {
// "binding_name": "#file_error",
// "binding_name_override": "#visible"
// }
// ]
// }
//},
//{
// "padding_1@manifest_validation.section_divider": {
// "bindings": [
// {
// "binding_name": "#file_error",
// "binding_name_override": "#visible"
// }
// ]
// }
//},
{
"error_text_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%cm" ],
"controls": [
{
"error_text@common.minecraftTenLabel": {
"size": [ 30, 10 ],
"text": "manifestvalidation.issue",
"color": "$main_header_text_color"
}
},
{
"space": {
"type": "panel",
"size": [ 2, 2 ]
}
},
{
"offset": {
"type": "panel",
"size": [ "fill", "100%c" ],
"controls": [
{
"error_label": {
"type": "label",
"color": "$main_header_text_color",
"size": [ "100% - 8px", "default" ],
"font_type": "smooth",
"offset": [ 0, 2 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"text": "#error_content_label",
"bindings": [
{
"binding_collection_name": "pack_errors",
"binding_name": "#error_content_label",
"binding_type": "collection"
}
]
}
}
]
}
}
],
"bindings": [
{
"binding_name": "#has_errors_or_warnings",
"binding_name_override": "#visible"
}
]
}
}
]
}
}
]
}
}
]
},
//---------------------------------------------------------------------------
// BUTTONS
//---------------------------------------------------------------------------
"delete_button@common_buttons.light_content_button": {
"size": [ 30, 30 ],
"$pressed_button_name": "button.delete_manifest",
"$button_content": "manifest_validation.trash_icon_wrapper",
"bindings": [
{
"binding_name": "(not #is_working)",
"binding_name_override": "#enabled"
}
]
},
"delete_text_button@common_buttons.light_text_button": {
"size": [ "100%", 20 ],
"$pressed_button_name": "button.delete_manifest",
"$button_text": "manifestvalidation.delete",
"bindings": [
{
"binding_name": "(not #is_working)",
"binding_name_override": "#enabled"
}
]
},
"clipboard_button@common_buttons.light_content_button": {
"size": [ 25, 25 ],
"$pressed_button_name": "button.copy_to_clipboard",
"$button_content": "manifest_validation.clipboard_icon_wrapper",
"bindings": [
{
"binding_name": "(not #is_working)",
"binding_name_override": "#enabled"
}
]
},
"refresh_button@common_buttons.light_content_button": {
"size": [ 30, 30 ],
"$pressed_button_name": "button.refresh_manifest",
"$button_content": "manifest_validation.refresh_icon_wrapper",
"bindings": [
{
"binding_name": "(not #is_working)",
"binding_name_override": "#enabled"
}
]
},
"refresh_text_button@common_buttons.light_text_button": {
"size": [ "100%", 20 ],
"$pressed_button_name": "button.refresh_manifest",
"$button_text": "selectServer.refresh",
"bindings": [
{
"binding_name": "(not #is_working)",
"binding_name_override": "#enabled"
}
]
},
//---------------------------------------------------------------------------
// PACK SECONDARY INFO
//---------------------------------------------------------------------------
"pack_secondary_info": {
"type": "panel",
"size": [ "100%", "100%c" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{
"layout@manifest_validation.error_pack_secondary_layout": {
"size": [ "100% - 4px", "100%c" ]
}
}
]
},
//---------------------------------------------------------------------------
// ERROR CONTENT ITEM
//---------------------------------------------------------------------------
"error_content_grid": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%", "100%c" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"factory": {
"name": "pack_error_factory",
"control_name": "manifest_validation.error_pack_content_layout"
},
"collection_name": "pack_errors",
"bindings": [
{
"binding_name": "#error_grid_dimensions",
"binding_name_override": "#collection_length"
}
]
},
//---------------------------------------------------------------------------
// PACK ERROR ITEM
//---------------------------------------------------------------------------
"pack_error_item": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%", "100%c" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{
"secondary@manifest_validation.pack_secondary_info": {}
},
{
"error_header": {
"type": "panel",
"size": [ "100%", "100%c + 3px" ],
"controls": [
{
"error_text@common.minecraftTenLabel": {
"size": [ "100%", "default" ],
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"offset": [ 2, 0 ],
"text": "manifestvalidation.errorlist",
"color": "$main_header_text_color"
}
}
]
}
},
{
"error@manifest_validation.error_content_grid": {}
}
]
},
//---------------------------------------------------------------------------
// PACK ERROR GROUP
//---------------------------------------------------------------------------
"pack_error_group": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%", "100%c" ],
"controls": [
{
"top_padding": {
"type": "panel",
"size": [ "100%", 10 ]
}
},
{
"errors@manifest_validation.pack_error_item": {}
},
{
"padding": {
"type": "panel",
"size": [ "100%", 4 ]
}
}
]
},
//---------------------------------------------------------------------------
// SCROLL REGION
//---------------------------------------------------------------------------
"common_scrolling_panel@common.scrolling_panel": {
"layer": 1,
"$scrolling_pane_size": [ "100% - 1px", "100%" ],
"$scrolling_content": "$scrolling_content",
"$scroll_size": [ 5, "100% - 4px" ],
"$show_background": false,
"anchor_from": "top_right",
"anchor_to": "top_right"
},
"common_content": {
"type": "input_panel",
"anchor_from": "top_left",
"anchor_to": "top_left"
},
"scrolling_offsets@manifest_validation.common_scrolling_panel": {
"size": [ "100% - 4px", "100%" ],
"offset": [ 2, 0 ],
"anchor_from": "top_left",
"anchor_to": "top_left"
},
"manifest_validation_scroll_content@manifest_validation.common_content": {
"controls": [
{
"scrolling_panel@manifest_validation.scrolling_offsets": {
"layer": 1,
"$scrolling_content": "manifest_validation.manifest_validation_scroll_panel"
}
}
]
},
"common_scroll_panel": {
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%-4px", "100%c" ],
"offset": [ 2, 0 ]
},
"manifest_validation_scroll_panel@manifest_validation.common_scroll_panel": {
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{
"pack_error_group@manifest_validation.pack_error_group": {
"anchor_from": "top_left",
"anchor_to": "top_left"
}
}
]
},
//---------------------------------------------------------------------------
// SCREEN
//---------------------------------------------------------------------------
"manifest_validation_screen@common.base_screen": {
"force_render_below": true,
"$screen_background_control": "common.screen_background",
"$screen_background_alpha": 0.65,
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
},
{
"from_button_id": "button.menu_tab_left",
"to_button_id": "button.menu_tab_left",
"mapping_type": "global",
"scope": "view"
},
{
"from_button_id": "button.menu_tab_right",
"to_button_id": "button.menu_tab_right",
"mapping_type": "global",
"scope": "view"
}
],
"$screen_content": "manifest_validation.manifest_validation_screen_content"
},
"manifest_validation_screen_content": {
"type": "panel",
"size": "$extra_large_screen_size",
"max_size": "$extra_large_max_screen_size",
"controls": [
{
"background@common_dialogs.main_panel_no_buttons": {
"$fill_alpha": 1,
"$text_name": "manifestvalidation.title",
"$child_control": "manifest_validation.manifest_validation_scroll_content",
"$show_close_button": true
}
}
]
}
}