mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-11-23 12:26:14 +00:00
309 lines
7.9 KiB
JSON
309 lines
7.9 KiB
JSON
{
|
|
"namespace": "smithing_table_pocket",
|
|
|
|
// Backgrounds //
|
|
|
|
"ingot_image@smithing_table.smithing_image": {
|
|
"anchor_to": "center",
|
|
"anchor_from": "center",
|
|
"size": [ 16, 16 ],
|
|
"texture": "textures/ui/ingot_image"
|
|
},
|
|
|
|
"background_image": {
|
|
"type": "image",
|
|
"size": [ "85%", "85%" ],
|
|
"texture": "textures/ui/background_panel"
|
|
},
|
|
|
|
// 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"
|
|
},
|
|
|
|
// Labels //
|
|
|
|
"upgrade_label": {
|
|
"type": "label",
|
|
"color": "$pocket_title_text_color",
|
|
"layer": 1,
|
|
"text": "container.smithing_table.upgrade",
|
|
"anchor_from": "center",
|
|
"anchor_to": "center"
|
|
},
|
|
|
|
// Text Edit //
|
|
|
|
"smithing_icon_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{ "smithing_icon@smithing_table_pocket.smithing_icon": {} }
|
|
]
|
|
},
|
|
|
|
"smithing_table_title_and_text_panel": {
|
|
"type": "panel",
|
|
"anchor_from": "bottom_left",
|
|
"anchor_to": "bottom_left",
|
|
"controls": [
|
|
{
|
|
"smithing_icon_panel@smithing_table_pocket.smithing_icon_panel": {
|
|
"layer": 1,
|
|
"anchor_from": "bottom_left",
|
|
"anchor_to": "bottom_left",
|
|
"offset": [ -5, -10 ]
|
|
}
|
|
},
|
|
{
|
|
"upgrade_label@smithing_table_pocket.upgrade_label": {
|
|
"anchor_from": "bottom_left",
|
|
"anchor_to": "bottom_left",
|
|
"layer": 1,
|
|
"offset": [ 40, -20 ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Slots //
|
|
|
|
"slots_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{
|
|
"input_slot@common.pocket_ui_large_container_item": {
|
|
"offset": [ 0, 0 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"$item_collection_name": "smithing_table_input_items"
|
|
}
|
|
},
|
|
{
|
|
"material_slot@common.pocket_ui_large_container_item": {
|
|
"offset": [ 48, 0 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"$item_collection_name": "smithing_table_material_items",
|
|
"$cell_overlay_ref": "smithing_table_pocket.ingot_image"
|
|
}
|
|
},
|
|
{
|
|
"result_slot@common.pocket_ui_large_container_item": {
|
|
"offset": [ 109, 0 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"$item_collection_name": "smithing_table_result_items",
|
|
"$button_ref": "smithing_table.smithing_table_output_slot_button"
|
|
}
|
|
},
|
|
{
|
|
"plus_sign@smithing_table_pocket.upgrade_label": {
|
|
"text": "+",
|
|
"offset": [ 38, 11 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"layer": 1
|
|
}
|
|
},
|
|
{
|
|
"arrow": {
|
|
"type": "image",
|
|
"texture": "textures/ui/arrow_inactive",
|
|
"size": [ 22, 15 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"offset": [ 83, 8 ],
|
|
"controls": [
|
|
{
|
|
"cross_out": {
|
|
"type": "image",
|
|
"layer": 1,
|
|
"texture": "textures/ui/crossout",
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#cross_out_icon",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// smithing_table Panel //
|
|
|
|
"smithing_table_contents_panel": {
|
|
"type": "stack_panel",
|
|
"size": [ 144, 100 ],
|
|
"anchor_from": "center",
|
|
"anchor_to": "center",
|
|
"offset": [ 0, -20 ],
|
|
"controls": [
|
|
{
|
|
"smithing_table_title_and_text_panel@smithing_table_pocket.smithing_table_title_and_text_panel": {
|
|
"size": [ "100%", "50%" ]
|
|
}
|
|
},
|
|
{
|
|
"slots_panel@smithing_table_pocket.slots_panel": {
|
|
"size": [ "100%", "50%" ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Inventory Grids //
|
|
|
|
"inventory_grid": {
|
|
"type": "grid",
|
|
"grid_rescaling_type": "horizontal",
|
|
"anchor_to": "top_left",
|
|
"anchor_from": "top_left",
|
|
"size": [ "100%", "default" ],
|
|
"maximum_grid_items": 36,
|
|
"collection_name": "combined_hotbar_and_inventory_items",
|
|
"grid_item_template": "common.pocket_ui_container_item",
|
|
"$item_collection_name": "combined_hotbar_and_inventory_items"
|
|
},
|
|
|
|
"inventory_content": {
|
|
"type": "panel",
|
|
"size": [ "100%-5px", "100%-5px" ],
|
|
"offset": [ "5px", "2px" ],
|
|
"anchor_to": "top_left",
|
|
"anchor_from": "top_left",
|
|
"controls": [
|
|
{
|
|
"scrolling_panel@common.scrolling_panel": {
|
|
"$allow_scrolling_even_when_content_fits": false,
|
|
"$scrolling_pane_size": [ "100%", "100%-2px" ],
|
|
"$scrolling_content": "smithing_table_pocket.inventory_grid",
|
|
"$scroll_box_mouse_image_control": "common-classic.button_state_default",
|
|
"$scroll_size": [ "8px", "100%" ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Half Screens //
|
|
|
|
"inventory_and_smithing_table_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{
|
|
"inventory_half_screen": {
|
|
"type": "panel",
|
|
"size": [ "50%", "100%" ],
|
|
"anchor_from": "left_middle",
|
|
"anchor_to": "left_middle",
|
|
|
|
"controls": [
|
|
{ "inventory_content@smithing_table_pocket.inventory_content": {} }
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"smithing_half_screen": {
|
|
"type": "panel",
|
|
"size": [ "50%", "100%" ],
|
|
"anchor_from": "right_middle",
|
|
"anchor_to": "right_middle",
|
|
|
|
"controls": [
|
|
{ "smithing_table_content@smithing_table_pocket.smithing_table_contents_panel": {} }
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
// Header //
|
|
|
|
"header": {
|
|
"type": "panel",
|
|
"size": [ "100%", 28 ],
|
|
"anchor_from": "top_middle",
|
|
"anchor_to": "top_middle",
|
|
"controls": [
|
|
{
|
|
"header_background": {
|
|
"type": "image",
|
|
"texture": "textures/ui/header_bar_2"
|
|
}
|
|
},
|
|
{
|
|
"close_button@common.legacy_pocket_close_button": { "offset": [ -3, 3 ] }
|
|
},
|
|
{
|
|
"panel": {
|
|
"type": "panel",
|
|
"anchor_from": "center",
|
|
"anchor_to": "center",
|
|
"controls": [
|
|
{
|
|
"title_label@smithing_table_pocket.upgrade_label": {
|
|
"text": "tile.smithing_table.name",
|
|
"layer": 1
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
// Header and content
|
|
"header_and_content_stack_panel": {
|
|
"type": "stack_panel",
|
|
"orientation": "vertical",
|
|
"size": [ "85%", "85%" ],
|
|
"controls": [
|
|
{ "header@smithing_table_pocket.header": { "layer": 2 } },
|
|
{
|
|
"inventory_and_smithing_table_panel@smithing_table_pocket.inventory_and_smithing_table_panel": {
|
|
"size": [ "100%", "fill" ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// smithing_table Screen //
|
|
|
|
"smithing_table_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{ "bg@smithing_table_pocket.background_image": {} },
|
|
{ "root_panel@common.root_panel": { "size": [ "85%", "85%" ], "layer": 1 } },
|
|
{ "header_and_content_stack_panel@smithing_table_pocket.header_and_content_stack_panel": {} },
|
|
|
|
{ "container_gamepad_helpers@common.container_gamepad_helpers": { "layer": 2 } },
|
|
{ "inventory_selected_icon_button@common.inventory_selected_icon_button": {} },
|
|
{ "hold_icon@common.inventory_take_progress_icon_button": {} },
|
|
{ "selected_item_details_factory@common.selected_item_details_factory": {} },
|
|
{
|
|
"item_lock_notification_factory@common.item_lock_notification_factory": {
|
|
"$offset": [ 0, "85%" ]
|
|
}
|
|
},
|
|
{ "flying_item_renderer@common.flying_item_renderer": { "layer": 21 } },
|
|
{ "bundle_touch_tooltip@gameplay.bundle_touch_tooltip": {} }
|
|
]
|
|
}
|
|
}
|