1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-23 13:36:18 +00:00
bedrock-samples/resource_pack/ui/stonecutter_screen_pocket.json
Mike Ammerlaan 6e0daa70a8 v1.21.40.3
2024-10-22 09:25:09 -07:00

483 lines
14 KiB
JSON

/********************************************************
+* (c) Mojang. All rights reserved *
+* (c) Microsoft. All rights reserved. *
+*********************************************************/
{
"namespace": "stonecutter_pocket",
//---------------------------------------------------------------------------
// #region Images
//---------------------------------------------------------------------------
"vertical_arrow_icon": {
"type": "image",
"texture": "textures/ui/arrow_down_large",
"size": [ 15, 22 ]
},
"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
}
},
"stonecutter_item_renderer": {
"type": "custom",
"renderer": "inventory_item_renderer",
"size": [ 16, 16 ],
"property_bag": {
"#item_id_aux": -12910592,
"#collection_name": "stonecutter_tab",
"#collection_index": 1
}
},
// #endregion
//---------------------------------------------------------------------------
// #region Item Slots
//---------------------------------------------------------------------------
"input_item_slot@common.pocket_ui_container_item": {
"anchor_from": "center",
"anchor_to": "center",
"$item_collection_name": "stonecutter_input_items"
},
"result_item_slot@common.pocket_ui_container_item": {
"anchor_from": "center",
"anchor_to": "center",
"$item_collection_name": "stonecutter_result_items",
"$button_ref": "stonecutter.result_slot_button"
},
// #endregion
//---------------------------------------------------------------------------
// #region Right Panel
//---------------------------------------------------------------------------
"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
}
},
{
"stonecutter_content_stack_panel@stonecutter_pocket.stonecutter_content_stack_panel": {
"layer": 2
}
}
]
}
},
{
"navigation_tabs_holder": {
"type": "panel",
"size": [ "100%c - 4px", "100%" ],
"controls": [
{ "right_navigation_tabs@stonecutter_pocket.right_navigation_tabs": {} }
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Right Navigation Tabs
//---------------------------------------------------------------------------
"right_tab_stonecutter@common_tabs.pocket_tab_right": {
"$tab_view_binding_name": "stonecutter_tab_toggle",
"$tab_content": "stonecutter_pocket.stonecutter_item_renderer",
"$toggle_binding_type": "global",
"$toggle_state_binding_name": "#is_right_tab_stonecutter"
},
"right_navigation_tabs": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ 35, "100%" ],
"offset": [ -4, 0 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{
"close": {
"type": "image",
"texture": "textures/ui/TabRightBackTopMost",
"size": [ "100%", 29 ],
"controls": [
{
"nodrop_zone@common.root_panel": {
"anchor_from": "center",
"anchor_to": "center",
"size": [ "100%", "100%" ]
}
},
{
"close_button@common.light_close_button": {
"anchor_from": "center",
"anchor_to": "center",
"offset": [ 0, 0 ],
"layer": 2
}
}
],
"bindings": [
{
"binding_name": "#close_button_visible",
"binding_name_override": "#visible"
}
]
}
},
{
"fill": {
"type": "panel",
"size": [ "100%", "fill" ]
}
},
{
"right_tab_stonecutter@stonecutter_pocket.right_tab_stonecutter": {
"$is_bottom_most_tab": true
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region stonecutter Content
//---------------------------------------------------------------------------
"input_slots_stack_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%c", "100%cm" ],
"controls": [
{ "input_item_slot@stonecutter_pocket.input_item_slot": {} }
]
},
// #endregion
//---------------------------------------------------------------------------
// #region stonecutter Content Stack Panel
//---------------------------------------------------------------------------
"stonecutter_content_stack_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100% - 12px", "100% - 12px" ],
"controls": [
{
"label_holder": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{ "stonecutter_label@stonecutter.stonecutter_label": {} }
]
}
},
{
"padding_1": {
"type": "panel",
"size": [ 0, 4 ]
}
},
{
"panel": {
"type": "panel",
"size": [ "100%", "fill" ],
"controls": [
{
"stack_panel": {
"type": "stack_panel",
"orientation": "vertical",
"controls": [
{
"input_slots_holder": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{ "input_slots_stack_panel@stonecutter_pocket.input_slots_stack_panel": {} }
]
}
},
{
"padding_3": {
"type": "panel",
"size": [ 0, 10 ]
}
},
{
"arrow_holder": {
"type": "panel",
"size": [ "100%", 22 ],
"controls": [
{ "vertical_arrow_icon@stonecutter_pocket.vertical_arrow_icon": {} }
]
}
},
{
"padding_4": {
"type": "panel",
"size": [ 0, 10 ]
}
},
{
"result_item_slot_holder": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{ "result_item_slot@stonecutter_pocket.result_item_slot": {} }
]
}
},
{
"padding_5": {
"type": "panel",
"size": [ 0, 4 ]
}
}
]
}
}
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Left Panel
//---------------------------------------------------------------------------
"inventory_panel": {
"type": "stack_panel",
"size": [ "100% - 12px", "100% - 12px" ],
"controls": [
{
"inventory_title_label_centerer": {
"type": "panel",
"size": [ "default", 14 ],
"controls": [
{
"inventory_title_label": {
"type": "label",
"color": "$title_text_color",
"text": "container.inventory",
"size": [ "default", "100%" ]
}
}
]
}
},
{
"inventory_scroll_panel@stonecutter_pocket.inventory_scroll_panel": {
"size": [ "100%", "fill" ]
}
}
]
},
"inventory_scroll_panel@common.container_scroll_panel": {
"$scrolling_content": "common.pocket_container_grid"
},
"pattern_button@stonecutter.stone_button": {
"size": [ 28, 28 ],
"$item_renderer_panel_size": [ 28, 28 ],
"$item_renderer_size": [ 26, 26 ]
},
"pattern_scroll_panel@stonecutter.scroll_panel": {
"$grid_item_template": "stonecutter_pocket.pattern_button"
},
"left_panel": {
"type": "stack_panel",
"size": [ "fill", "100%" ],
"orientation": "horizontal",
"controls": [
{
"gamepad_helpers_and_tabs_holder": {
"type": "panel",
"size": [ "100%c", "100%" ],
"controls": [
{
"tabs_left_gamepad_helpers@common.tabs_left_gamepad_helpers": {
"size": [ 14, 0 ],
"inherit_max_sibling_height": true,
"anchor_from": "bottom_left",
"anchor_to": "bottom_left"
}
},
{
"navigation_tabs_holder": {
"type": "panel",
"size": [ "100%c - 4px", "100%" ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"controls": [
{ "left_navigation_tabs@stonecutter_pocket.left_navigation_tabs": {} }
]
}
}
]
}
},
{
"content@common.root_panel": {
"size": [ "fill", "100%" ],
"controls": [
{
"bg@common.common_panel": {
"size": [ "100%", "100%" ],
"$show_close_button": false
}
},
{
"inventory_panel@stonecutter_pocket.inventory_panel": {
"layer": 2,
"bindings": [
{
"binding_type": "global",
"binding_name": "#is_left_tab_inventory",
"binding_name_override": "#visible"
}
]
}
},
{
"pattern_scroll_panel@stonecutter_pocket.pattern_scroll_panel": {
"layer": 2,
"bindings": [
{
"binding_type": "global",
"binding_name": "(not #is_left_tab_inventory)",
"binding_name_override": "#visible"
}
]
}
}
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Left Navigation Tabs
//---------------------------------------------------------------------------
"left_tab_stones@common_tabs.pocket_tab_left": {
"$is_top_most_tab": true,
"$tab_view_binding_name": "stones_tab_toggle",
"$tab_content": "stonecutter_pocket.stonecutter_item_renderer",
"$toggle_group_forced_index": "$left_tab_index_stones",
"$toggle_binding_type": "global",
"$toggle_state_binding_name": "#is_left_tab_stones"
},
"left_tab_inventory@common_tabs.pocket_tab_left": {
"$is_bottom_most_tab": true,
"$tab_view_binding_name": "inventory_tab_toggle",
"$tab_content": "stonecutter_pocket.chest_item_renderer",
"$toggle_group_forced_index": "$left_tab_index_inventory",
"$toggle_binding_type": "global",
"$toggle_state_binding_name": "#is_left_tab_inventory"
},
"left_navigation_tabs": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ 35, "100%" ],
"offset": [ 4, 0 ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"controls": [
{ "left_tab_stones@stonecutter_pocket.left_tab_stones": {} },
{
"padding": {
"type": "panel",
"size": [ 0, "fill" ]
}
},
{ "left_tab_inventory@stonecutter_pocket.left_tab_inventory": {} }
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Base Panels
//---------------------------------------------------------------------------
"pocket_hotbar_and_content_panels@common.pocket_hotbar_and_content_panels": {
"layer": 2,
"$left_panel_control": "stonecutter_pocket.left_panel",
"$right_panel_control": "stonecutter_pocket.right_panel"
},
"stonecutter_panel": {
"type": "panel",
"controls": [
{ "pocket_hotbar_and_content_panels@stonecutter_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": {} },
{
"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