1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-27 04:38:56 +00:00
bedrock-samples/resource_pack/ui/smithing_table_2_screen_pocket.json
Mike Ammerlaan 6e0daa70a8 v1.21.40.3
2024-10-22 09:25:09 -07:00

625 lines
17 KiB
JSON

{
"namespace": "smithing_table_2_pocket",
//------------------------------------------------------------------------------------
// #region Backgrounds
//---------------------------------------------------------------------------
"smithing_table_item_renderer": {
"type": "custom",
"renderer": "inventory_item_renderer",
"size": [ 16, 16 ],
"property_bag": {
"#item_id_aux": -13238272,
"#collection_name": "smithing_tab",
"#collection_index": 0
}
},
"smithing_image": {
"type": "image",
"anchor_to": "center",
"anchor_from": "center",
"size": [ 24, 24 ]
},
"smithing_material_image_ingot@smithing_table_2_pocket.smithing_image": {
"texture": "textures/ui/ingot_image"
},
"background_image": {
"type": "image",
"size": [ "85%", "85%" ],
"texture": "textures/ui/background_panel"
},
"smithing_input_image_templates@smithing_table_2_pocket.smithing_image": {
"texture": "textures/ui/templates_slot_overlay",
"uv": "@smithing_table_2.templates_animation",
"uv_size": [ 16, 16 ]
},
"smithing_material_image_all@smithing_table_2_pocket.smithing_image": {
"texture": "textures/ui/smithing_material_slot_overlay",
"uv": "@smithing_table_2.all_materials_animation",
"uv_size": [ 16, 16 ]
},
"smithing_input_image_armors@smithing_table_2_pocket.smithing_image": {
"texture": "textures/ui/armors_slot_overlay",
"uv": "@smithing_table_2.armors_animation",
"uv_size": [ 16, 16 ]
},
"smithing_input_image_armors_and_tools@smithing_table_2_pocket.smithing_image": {
"texture": "textures/ui/armors_and_tools_slot_overlay",
"uv": "@smithing_table_2.armors_and_tools_animation",
"uv_size": [ 16, 16 ]
},
"template_overlay_image": {
"type": "panel",
"controls": [
{
"templates@smithing_table_2_pocket.smithing_input_image_templates": {
"bindings": [
{
"binding_name": "#show_input_overlay_templates",
"binding_name_override": "#visible"
}
]
}
}
]
},
"input_overlay_image": {
"type": "panel",
"controls": [
{
"armors_and_tools@smithing_table_2_pocket.smithing_input_image_armors_and_tools": {
"bindings": [
{
"binding_name": "#show_input_overlay_armors_and_tools",
"binding_name_override": "#visible"
}
]
}
},
{
"armors@smithing_table_2_pocket.smithing_input_image_armors": {
"bindings": [
{
"binding_name": "#show_input_overlay_armors",
"binding_name_override": "#visible"
}
]
}
}
]
},
"material_overlay_image": {
"type": "panel",
"controls": [
{
"ingot@smithing_table_2_pocket.smithing_material_image_ingot": {
"bindings": [
{
"binding_name": "#show_material_overlay_ingot",
"binding_name_override": "#visible"
}
]
}
},
{
"all_materials@smithing_table_2_pocket.smithing_material_image_all": {
"bindings": [
{
"binding_name": "#show_material_overlay_all",
"binding_name_override": "#visible"
}
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Arrow
//---------------------------------------------------------------------------
"arrow_icon": {
"type": "image",
"texture": "textures/ui/arrow_icon",
"size": [ 24, 16 ]
},
"smithing_icon": {
"type": "image",
"texture": "textures/ui/smithing_icon",
"size": [ 30, 30 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left"
},
// #endregion
//---------------------------------------------------------------------------
// #region labels
//---------------------------------------------------------------------------
"upgrade_label": {
"type": "label",
"color": "$title_text_color",
"layer": 1,
"text": "container.smithing_table.upgrade"
},
// #endregion
//---------------------------------------------------------------------------
// #region Slots
//---------------------------------------------------------------------------
"slot_grid_item": {
"type": "panel",
"controls": [
{
"slot@common.pocket_ui_container_item": {
"$hover_text_max_width": 500
}
}
]
},
"template_slot@smithing_table_2_pocket.slot_grid_item": {
"$item_collection_name": "smithing_table_template_items",
"$cell_overlay_ref": "smithing_table_2_pocket.template_overlay_image"
},
"input_slot@smithing_table_2_pocket.slot_grid_item": {
"$item_collection_name": "smithing_table_input_items",
"$cell_overlay_ref": "smithing_table_2_pocket.input_overlay_image"
},
"material_slot@smithing_table_2_pocket.slot_grid_item": {
"$item_collection_name": "smithing_table_material_items",
"$cell_overlay_ref": "smithing_table_2_pocket.material_overlay_image"
},
"inputs_stack": {
"type": "stack_panel",
"orientation": "vertical",
"controls": [
{
"template_slot@smithing_table_2_pocket.template_slot": {
"size": [ "100%", "100%c" ]
}
},
{
"padding1": {
"type": "panel",
"size": [ 0, 4 ]
}
},
{
"input_slot@smithing_table_2_pocket.input_slot": {
"size": [ "100%", "100%c" ]
}
},
{
"padding2": {
"type": "panel",
"size": [ 0, 4 ]
}
},
{
"material_slot@smithing_table_2_pocket.material_slot": {
"size": [ "100%", "100%c" ]
}
}
]
},
"inputs_panel": {
"type": "panel",
"controls": [
{
"inputs_stack@smithing_table_2_pocket.inputs_stack": {
"anchor_from": "center",
"anchor_to": "center"
}
}
]
},
"result_slot@smithing_table_2_pocket.slot_grid_item": {
"anchor_from": "center",
"anchor_to": "center",
"$item_collection_name": "smithing_table_result_items",
"$button_ref": "smithing_table.smithing_table_output_slot_button"
},
"cross_out_image": {
"type": "image",
"layer": 1,
"texture": "textures/ui/crossout"
},
"cross_out_icon": {
"type": "button",
"hover_control": "hover",
"controls": [
{ "default@smithing_table_2_pocket.cross_out_image": {} },
{
"hover@common.hover_text": {
"layer": 29,
"$hover_text_max_width": 500,
"bindings": [
{
"binding_name": "#no_result_arrow_tooltip",
"binding_name_override": "#hover_text"
}
]
}
}
],
"bindings": [
{
"binding_name": "#cross_out_icon",
"binding_name_override": "#visible"
}
]
},
"crafting_arrow": {
"type": "image",
"texture": "textures/ui/arrow_inactive",
"size": [ "75%", "75%" ],
"anchor_from": "center",
"anchor_to": "center",
"controls": [
{
"cross_out@smithing_table_2_pocket.cross_out_icon": {}
}
]
},
"crafting_arrow_grid_item": {
"type": "panel",
"size": [ "20%", "20%" ],
"controls": [
{ "crafting_arrow@smithing_table_2_pocket.crafting_arrow": {} }
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Result preview
//---------------------------------------------------------------------------
"result_item_preview": {
"type": "panel",
"size": [ "70%", "70%" ],
"offset": [ "10%", 0 ],
"anchor_from": "center",
"anchor_to": "center",
"controls": [
{
"smithing_preview_renderer": {
"type": "custom",
"renderer": "equipment_preview_renderer",
"animation_reset_name": "screen_animation_reset",
"anims": [
"@common.screen_exit_size_animation_push",
"@common.screen_exit_size_animation_pop",
"@common.screen_entrance_size_animation_push",
"@common.screen_entrance_size_animation_pop"
],
"layer": 8,
"rotation_x": 30,
"rotation_y": -30,
"bindings": [
{
"binding_name": "#item_id_aux",
"binding_type": "collection",
"binding_collection_name": "smithing_table_result_items"
},
{
"binding_name": "#item_custom_color",
"binding_type": "collection",
"binding_collection_name": "smithing_table_result_items"
},
{
"binding_name": "#armor_trim_pattern",
"binding_type": "collection",
"binding_collection_name": "smithing_table_result_items"
},
{
"binding_name": "#armor_trim_material",
"binding_type": "collection",
"binding_collection_name": "smithing_table_result_items"
}
]
}
}
]
},
"result_item_preview_grid_item": {
"type": "panel",
"controls": [
{ "result_preview@smithing_table_2_pocket.result_item_preview": {} }
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Smithing content
//---------------------------------------------------------------------------
"smithing_table_contents_panel": {
"type": "grid",
"offset": [ 0, 0 ],
"size": [ "100%-40px", "100%-40px" ],
"grid_dimensions": [ 5, 5 ],
"controls": [
{
"label_holder": {
"type": "panel",
"grid_position": [ 2, 0 ],
"controls": [
{ "title_label@smithing_table_2_pocket.upgrade_label": {} }
]
}
},
{
"inputs@smithing_table_2_pocket.inputs_panel": {
"grid_position": [ 0, 1 ],
"size": [ "20%", "60%" ]
}
},
{
"result_slot@smithing_table_2_pocket.result_slot": {
"grid_position": [ 2, 2 ],
"size": [ "20%", "20%" ]
}
},
{
"crafting_arrow@smithing_table_2_pocket.crafting_arrow_grid_item": {
"grid_position": [ 1, 2 ],
"size": [ "20%", "20%" ]
}
},
{
"result_item_preview@smithing_table_2_pocket.result_item_preview_grid_item": {
"grid_position": [ 3, 1 ],
"size": [ "40%", "60%" ] // two cols wide, three rows
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Left panel
//---------------------------------------------------------------------------
"chest_item_renderer": {
"type": "custom",
"renderer": "inventory_item_renderer",
"size": [ 16, 16 ],
"property_bag": {
"#item_id_aux": 3538944,
"#collection_name": "inventory_tab",
"#collection_index": 0
}
},
"left_tab_inventory@common_tabs.pocket_tab_left": {
"$tab_view_binding_name": "inventory_tab_toggle",
"$tab_content": "smithing_table_2_pocket.chest_item_renderer",
"$toggle_binding_type": "global",
"$toggle_state_binding_name": "#is_left_tab_inventory"
},
"left_navigation_tabs": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ 35, "default" ],
"offset": [ 4, 0 ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"controls": [
{
"left_tab_inventory@smithing_table_2_pocket.left_tab_inventory": {
"$is_bottom_most_tab": true
}
}
]
},
"inventory_scroll_panel@common.container_scroll_panel": {
"size": [ "100% - 12px", "100% - 12px" ],
"$scrolling_content": "common.pocket_container_grid"
},
"left_panel": {
"type": "stack_panel",
"size": [ "fill", "100%" ],
"orientation": "horizontal",
"controls": [
{
"gamepad_helpers_and_tabs_holder": {
"type": "panel",
"size": [ "100%c", "100%" ],
"controls": [
{
"navigation_tabs_holder": {
"type": "panel",
"size": [ "100%c - 4px", "100%c" ],
"anchor_from": "bottom_right",
"anchor_to": "bottom_right",
"controls": [
{ "left_navigation_tabs@smithing_table_2_pocket.left_navigation_tabs": {} }
]
}
}
]
}
},
{
"content@common.root_panel": {
"size": [ "fill", "100%" ],
"controls": [
{
"bg@common.common_panel": {
"size": [ "100%", "100%" ],
"$show_close_button": false
}
},
{
"inventory_scroll_panel@smithing_table_2_pocket.inventory_scroll_panel": {
"layer": 2,
"bindings": [
{
"binding_type": "global",
"binding_name": "#is_left_tab_inventory",
"binding_name_override": "#visible"
}
]
}
}
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Right panel
//---------------------------------------------------------------------------
"right_tab_smithing_table@common_tabs.pocket_tab_right": {
"$tab_content": "smithing_table_2_pocket.smithing_table_item_renderer",
"$toggle_binding_type": "global",
"$toggle_state_binding_name": "#is_right_tab_smithing_table"
},
"right_navigation_tabs": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ 35, "100%" ],
"offset": [ -4, 0 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{ "pocket_tab_close_and_help_button@common_tabs.pocket_tab_close_and_help_button": {} },
{
"fill": {
"type": "panel",
"size": [ "100%", "fill" ]
}
},
{
"right_tab_smithing_table@smithing_table_2_pocket.right_tab_smithing_table": {
"$is_bottom_most_tab": true
}
}
]
},
"right_panel": {
"type": "stack_panel",
"size": [ "fill", "100%" ],
"orientation": "horizontal",
"controls": [
{
"content@common.root_panel": {
"size": [ "fill", "100%" ],
"controls": [
{
"bg@common.common_panel": {
"size": [ "100%", "100%" ],
"$show_close_button": false
}
},
{
"smithing_content_stack_panel@smithing_table_2_pocket.smithing_table_contents_panel": {
"layer": 2
}
}
]
}
},
{
"navigation_tabs_holder": {
"type": "panel",
"size": [ "100%c - 4px", "100%" ],
"controls": [
{ "right_navigation_tabs@smithing_table_2_pocket.right_navigation_tabs": {} }
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Smithing table panel
//---------------------------------------------------------------------------
"pocket_hotbar_and_content_panels@common.pocket_hotbar_and_content_panels": {
"layer": 2,
"$left_panel_control": "smithing_table_2_pocket.left_panel",
"$right_panel_control": "smithing_table_2_pocket.right_panel"
},
"smithing_table_panel": {
"type": "panel",
"controls": [
{ "pocket_hotbar_and_content_panels@smithing_table_2_pocket.pocket_hotbar_and_content_panels": {} },
{
"container_gamepad_helpers@common.container_gamepad_helpers": {
"size": [ "100%", 40 ],
"$gamepad_helper_size": [ "100%c", 15 ],
"$a_b_stack_panel_orientation": "vertical",
"$x_y_stack_panel_orientation": "vertical",
"$a_b_stack_panel_size": [ "100%cm", "100%" ],
"$x_y_stack_panel_size": [ "100%cm", "100%" ]
}
},
{
"selected_item_details_factory@common.selected_item_details_factory": {
"$offset": [ 0, "-37px" ]
}
},
{
"item_lock_notification_factory@common.item_lock_notification_factory": {
"$offset": [ 0, "85%" ]
}
},
{ "inventory_selected_icon_button@common.inventory_selected_icon_button": {} },
{ "inventory_take_progress_icon_button@common.inventory_take_progress_icon_button": {} },
{ "flying_item_renderer@common.flying_item_renderer": { "layer": 15 } },
{ "bundle_touch_tooltip@gameplay.bundle_touch_tooltip": {} }
]
}
// #endregion
}