mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-11-23 12:26:14 +00:00
430 lines
11 KiB
JSON
430 lines
11 KiB
JSON
{
|
|
"namespace": "brewing_stand_pocket",
|
|
|
|
"generic_label": {
|
|
"type": "label",
|
|
"color": "$pocket_title_text_color",
|
|
"anchor_from": "center",
|
|
"anchor_to": "center"
|
|
},
|
|
|
|
//-----------------------------------------------------------
|
|
// Images
|
|
//-----------------------------------------------------------
|
|
"brewing_fuel_pipes": {
|
|
"type": "image",
|
|
"layer": 2,
|
|
"texture": "textures/ui/brewing_fuel_pipes_pocket",
|
|
"anchor_from": "center",
|
|
"anchor_to": "center",
|
|
"offset": [ -47, -5 ],
|
|
"size": [ 19, 16 ]
|
|
},
|
|
|
|
"bubbles_empty_image": {
|
|
"type": "image",
|
|
"texture": "textures/ui/bubbles_empty_pocket",
|
|
"layer": 2,
|
|
"offset": [ -23, -14 ],
|
|
"size": [ 12, 30 ],
|
|
"anchor_from": "center",
|
|
"anchor_to": "center"
|
|
},
|
|
|
|
"bubbles_full_image": {
|
|
"type": "image",
|
|
"texture": "textures/ui/bubbles_full_pocket",
|
|
"layer": 3,
|
|
"offset": [ -23, -14 ],
|
|
"size": [ 12, 30 ],
|
|
"clip_direction": "down",
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#brewing_bubbles_ratio",
|
|
"binding_name_override": "#clip_ratio",
|
|
"binding_condition": "always"
|
|
}
|
|
]
|
|
},
|
|
|
|
"bottle_empty_image": {
|
|
"type": "image",
|
|
"texture": "textures/ui/bottle_empty_pocket",
|
|
"layer": 2,
|
|
"size": [ 9, 13 ],
|
|
"anchor_from": "center",
|
|
"anchor_to": "center",
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#empty_bottle_image_visible",
|
|
"binding_name_override": "#visible",
|
|
"binding_type": "collection",
|
|
"binding_collection_name": "$item_collection_name"
|
|
}
|
|
]
|
|
},
|
|
|
|
// Backgrounds //
|
|
|
|
"background_image": {
|
|
"type": "image",
|
|
"size": [ "85%", "85%" ],
|
|
"texture": "textures/ui/background_panel"
|
|
},
|
|
|
|
// Output Slot //
|
|
|
|
"output_slot@common.pocket_ui_large_container_item": {
|
|
"$item_collection_name": "brewing_result_items",
|
|
"$cell_overlay_ref": "brewing_stand_pocket.bottle_empty_image"
|
|
},
|
|
|
|
// Slots //
|
|
|
|
"brewing_input_slot": {
|
|
"type": "panel",
|
|
"size": [ 32, 32 ],
|
|
"offset": [ -48, 0 ],
|
|
"anchor_from": "top_right",
|
|
"anchor_to": "top_right",
|
|
"controls": [
|
|
{
|
|
"input_slot@common.pocket_ui_large_container_item": {
|
|
"$item_collection_name": "brewing_input_item",
|
|
"$focus_id": "input_slot",
|
|
"$focus_override_left": "fuel_slot"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"brewing_fuel_slot": {
|
|
"type": "panel",
|
|
"size": [ 32, 32 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"controls": [
|
|
{
|
|
"fuel_slot@common.pocket_ui_large_container_item": {
|
|
"$item_collection_name": "brewing_fuel_item",
|
|
"$cell_overlay_ref": "brewing_stand.fuel_empty_image",
|
|
"$focus_id": "fuel_slot",
|
|
"$focus_override_right": "input_slot"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"brewing_out_slots": {
|
|
"type": "grid",
|
|
"size": [ 130, 42 ],
|
|
"anchor_from": "bottom_right",
|
|
"anchor_to": "bottom_right",
|
|
"grid_dimensions": [ 3, 1 ],
|
|
"collection_name": "brewing_result_items",
|
|
"controls": [
|
|
{
|
|
"left_offset": {
|
|
"type": "panel",
|
|
"grid_position": [ 0, 0 ],
|
|
"controls": [
|
|
{
|
|
"output_slot1@brewing_stand_pocket.output_slot": {
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"$focus_override_up": "input_slot"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"middle": {
|
|
"type": "panel",
|
|
"grid_position": [ 1, 0 ],
|
|
"controls": [
|
|
{
|
|
"output_slot2@brewing_stand_pocket.output_slot": {
|
|
"anchor_from": "bottom_middle",
|
|
"anchor_to": "bottom_middle"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"right_offset": {
|
|
"type": "panel",
|
|
"grid_position": [ 2, 0 ],
|
|
"controls": [
|
|
{
|
|
"output_slot3@brewing_stand_pocket.output_slot": {
|
|
"anchor_from": "top_right",
|
|
"anchor_to": "top_right"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"slots_panel": {
|
|
"type": "panel",
|
|
"size": [ 130, 94 ],
|
|
"controls": [
|
|
{
|
|
"brewing_input_slot@brewing_stand_pocket.brewing_input_slot": {
|
|
}
|
|
},
|
|
{
|
|
"brewing_fuel_slot@brewing_stand_pocket.brewing_fuel_slot": {
|
|
}
|
|
},
|
|
{
|
|
"brewing_out_slots@brewing_stand_pocket.brewing_out_slots": {
|
|
}
|
|
},
|
|
{
|
|
"brewing_arrow_panel": {
|
|
"type": "panel",
|
|
"anchor_from": "top_right",
|
|
"anchor_to": "top_right",
|
|
"size": [ 9, 41 ],
|
|
"offset": [ -36, 14 ],
|
|
"controls": [
|
|
{
|
|
"brewing_arrow_empty_image@brewing_stand.brewing_arrow_empty_image": {
|
|
"layer": 0,
|
|
"texture": "textures/ui/brewing_arrow_large_empty",
|
|
"size": [ 9, 42 ],
|
|
"offset": [ 0, 0 ]
|
|
}
|
|
},
|
|
{
|
|
"brewing_arrow_full_image@brewing_stand.brewing_arrow_full_image": {
|
|
"layer": 1,
|
|
"texture": "textures/ui/brewing_arrow_large_full",
|
|
"size": [ 9, 42 ],
|
|
"offset": [ 0, 0 ]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"brewing_bubbles_panel": {
|
|
"type": "panel",
|
|
"size": [ 12, 29 ],
|
|
"offset": [ 34, 11 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"controls": [
|
|
{
|
|
"bubbles_empty_image@brewing_stand_pocket.bubbles_empty_image": {
|
|
"layer": 0,
|
|
"offset": [ 0, -1 ]
|
|
}
|
|
},
|
|
{
|
|
"bubbles_full_image@brewing_stand_pocket.bubbles_full_image": {
|
|
"layer": 1,
|
|
"offset": [ 0, 0 ]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"brewing_fuel_bar_panel": {
|
|
"type": "panel",
|
|
"size": [ 24, 6 ],
|
|
"offset": [ 28, 42 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"controls": [
|
|
{
|
|
"brewing_fuel_bar_empty_image@brewing_stand.brewing_fuel_bar_empty_image": {
|
|
"layer": 0,
|
|
"offset": [ 0, 0 ]
|
|
}
|
|
},
|
|
{
|
|
"brewing_fuel_bar_full_image@brewing_stand.brewing_fuel_bar_full_image": {
|
|
"layer": 2,
|
|
"offset": [ 0, 0 ]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"brewing_fuel_pipes@brewing_stand_pocket.brewing_fuel_pipes": {
|
|
"layer": 3,
|
|
"offset": [ 9, 31 ],
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left"
|
|
}
|
|
},
|
|
{
|
|
"brewing_pipes@brewing_stand.brewing_pipes": {
|
|
"layer": 3,
|
|
"texture": "textures/ui/brewing_pipes_large",
|
|
"size": [ 68, 32 ],
|
|
"offset": [ -31, 31 ],
|
|
"anchor_from": "top_right",
|
|
"anchor_to": "top_right"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// 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": {
|
|
"$scrolling_pane_size": [ "100%", "100%-2px" ],
|
|
"$scrolling_content": "brewing_stand_pocket.inventory_grid",
|
|
"$scroll_box_mouse_image_control": "common-classic.button_state_default",
|
|
"$scroll_size": [ "8px", "100%" ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Brewing Stand Panel //
|
|
|
|
"brewing_stand_contents_panel": {
|
|
"type": "panel",
|
|
"offset": [ 0, "default-4px" ],
|
|
"controls": [
|
|
{
|
|
"slots_panel@slots_panel": {
|
|
"offset": [ -5, -10 ]
|
|
}
|
|
}
|
|
]
|
|
|
|
},
|
|
|
|
|
|
// 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"
|
|
}
|
|
},
|
|
{ "legacy_pocket_close_button@common.legacy_pocket_close_button": { "offset": [ -3, 3 ] } },
|
|
{
|
|
"panel": {
|
|
"type": "panel",
|
|
"anchor_from": "center",
|
|
"anchor_to": "center",
|
|
"controls": [
|
|
{
|
|
"title_label@brewing_stand_pocket.generic_label": {
|
|
"text": "$container_title",
|
|
"layer": 1
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Layout Content Panels //
|
|
|
|
"inventory_and_brewing_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{
|
|
"inventory_half_screen": {
|
|
"type": "panel",
|
|
"size": [ "50%", "100%" ],
|
|
"anchor_from": "left_middle",
|
|
"anchor_to": "left_middle",
|
|
|
|
"controls": [
|
|
{ "inventory_content@brewing_stand_pocket.inventory_content": {} }
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"brewing_half_screen": {
|
|
"type": "panel",
|
|
"size": [ "50%", "100%" ],
|
|
"anchor_from": "right_middle",
|
|
"anchor_to": "right_middle",
|
|
|
|
"controls": [
|
|
{ "brewing_stand_contents_panel@brewing_stand_pocket.brewing_stand_contents_panel": {} }
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"header_and_content_stack_panel": {
|
|
"type": "stack_panel",
|
|
"orientation": "vertical",
|
|
"size": [ "85%", "85%" ],
|
|
"controls": [
|
|
{ "header@brewing_stand_pocket.header": { "layer": 2 } },
|
|
{
|
|
"inventory_and_brewing_panel@brewing_stand_pocket.inventory_and_brewing_panel": {
|
|
"size": [ "100%", "fill" ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
// Brewing Stand Screen //
|
|
|
|
"brewing_stand_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{ "bg@brewing_stand_pocket.background_image": {} },
|
|
{ "root_panel@common.root_panel": { "size": [ "85%", "85%" ], "layer": 1 } },
|
|
{ "header_and_content_stack_panel@brewing_stand_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": 12 } },
|
|
{ "bundle_touch_tooltip@gameplay.bundle_touch_tooltip": {} }
|
|
]
|
|
}
|
|
}
|