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/cartography_screen_pocket.json
Mike Ammerlaan 6e0daa70a8 v1.21.40.3
2024-10-22 09:25:09 -07:00

529 lines
14 KiB
JSON

/********************************************************
+* (c) Mojang. All rights reserved *
+* (c) Microsoft. All rights reserved. *
+*********************************************************/
{
"namespace": "cartography_pocket",
//---------------------------------------------------------------------------
// #region Images
//---------------------------------------------------------------------------
"vertical_arrow_icon": {
"type": "image",
"texture": "textures/ui/arrow_down_small",
"size": [ 11, 9 ]
},
"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
}
},
"cartography_item_renderer": {
"type": "custom",
"renderer": "inventory_item_renderer",
"size": [ 16, 16 ],
"property_bag": {
"#item_id_aux": -13107200,
"#collection_name": "cartography_tab",
"#collection_index": 0
}
},
// #endregion
//---------------------------------------------------------------------------
// #region Item Slots
//---------------------------------------------------------------------------
"input_item_slot@common.pocket_ui_container_item": {
"anchor_from": "center",
"anchor_to": "center",
"$item_collection_name": "cartography_input_items"
},
"additional_item_slot@common.pocket_ui_container_item": {
"anchor_from": "center",
"anchor_to": "center",
"$item_collection_name": "cartography_additional_items"
},
"result_item_slot@common.pocket_ui_container_item": {
"anchor_from": "center",
"anchor_to": "center",
"$item_collection_name": "cartography_result_items",
"$focus_override_up_binding_type": "none",
"$focus_override_up": "cartography_input",
"$button_ref": "cartography.cartography_output_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
}
},
{
"cartography_content_stack_panel@cartography_pocket.cartography_content_stack_panel": {
"layer": 2
}
}
]
}
},
{
"navigation_tabs_holder": {
"type": "panel",
"size": [ "100%c - 4px", "100%" ],
"controls": [
{ "right_navigation_tabs@cartography_pocket.right_navigation_tabs": {} }
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Right Navigation Tabs
//---------------------------------------------------------------------------
"right_tab_cartography@common_tabs.pocket_tab_right": {
"$tab_view_binding_name": "cartography_tab_toggle",
"$tab_content": "cartography_pocket.cartography_item_renderer",
"$toggle_binding_type": "global",
"$toggle_state_binding_name": "#is_right_tab_cartography"
},
"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_cartography@cartography_pocket.right_tab_cartography": {
"$is_bottom_most_tab": true
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region cartography Content
//---------------------------------------------------------------------------
"input_slots_stack_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%c", "100%cm" ],
"controls": [
{ "input_item_slot@cartography_pocket.input_item_slot": {} }
]
},
// #endregion
//---------------------------------------------------------------------------
// #region cartography Content Stack Panel
//---------------------------------------------------------------------------
"input_slots": {
"type": "stack_panel",
"size": [ "default", 28 ],
"orientation": "horizontal",
"controls": [
{
"input_item_slot@cartography_pocket.input_item_slot": {
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"offset": [ 0, 1 ],
"$item_collection_name": "cartography_input_items",
"$focus_id_binding_type": "none",
"$focus_id": "cartography_input",
"$focus_override_down_binding_type": "none",
"$focus_override_down": "cartography_result",
"$focus_override_right_binding_type": "none",
"$focus_override_right": "cartography_additional"
}
},
{
"plus_centerer": {
"type": "panel",
"size": [ "100%c+14px", "100%" ],
"controls": [
{
"plus_sign_icon@cartography.plus_sign_icon": {
}
}
]
}
},
{
"additional_item_slot@cartography_pocket.additional_item_slot": {
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"offset": [ 0, -1 ],
"$item_collection_name": "cartography_additional_items",
"$focus_id_binding_type": "none",
"$focus_id": "cartography_additional",
"$focus_override_left_binding_type": "none",
"$focus_override_left": "cartography_input",
"$focus_override_down_binding_type": "none",
"$focus_override_down": "cartography_result"
}
}
]
},
"cartography_content_stack_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100% - 12px", "100% - 8px" ],
"controls": [
{
"label_holder": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{ "cartography_label@cartography.title_label": {} }
]
}
},
{
"padding_1": {
"type": "panel",
"size": [ 0, 2 ]
}
},
{
"panel": {
"type": "panel",
"size": [ "100%", 28 ],
"controls": [
{
"input_slots@cartography_pocket.input_slots": {
}
}
]
}
},
{
"padding_2": {
"type": "panel",
"size": [ 0, 4 ]
}
},
{
"map_centerer": {
"type": "panel",
"size": [ "100%", "fill" ],
"max_size": [ "100%", 66 ],
"controls": [
{
"map_image_panel@cartography.map_image_panel": {
"size": [ "100%y", "100%" ],
"max_size": [ 66, 66 ]
}
}
]
}
},
{
"description_centerer": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"output_description_label@cartography.output_description_label": {
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"offset": [ 0, 2 ]
}
}
]
}
},
{
"padding_3": {
"type": "panel",
"size": [ 0, 2 ]
}
},
{
"arrow_centerer": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"vertical_arrow_icon@cartography_pocket.vertical_arrow_icon": {}
}
]
}
},
{
"padding_4": {
"type": "panel",
"size": [ 0, 1 ]
}
},
{
"result_centerer": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"result_item_slot@cartography_pocket.result_item_slot": {
}
}
]
}
},
{
"filling_panel": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"text_box_panel@cartography.text_box_panel": {
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Left Panel
//---------------------------------------------------------------------------
"inventory_panel": {
"type": "stack_panel",
"size": [ "100% - 12px", "100% - 9px" ],
"controls": [
{
"inventory_title_label_centerer": {
"type": "panel",
"size": [ "default", 11 ],
"controls": [
{
"inventory_title_label": {
"type": "label",
"color": "$title_text_color",
"text": "container.inventory",
"size": [ "default", "100%" ]
}
}
]
}
},
{
"inventory_scroll_panel@cartography_pocket.inventory_scroll_panel": {
"size": [ "100%", "fill" ]
}
}
]
},
"inventory_scroll_panel@common.container_scroll_panel": {
"$scrolling_content": "common.pocket_container_grid"
},
"pattern_button@cartography.stone_button": {
"size": [ 28, 28 ],
"$item_renderer_panel_size": [ 28, 28 ],
"$item_renderer_size": [ 26, 26 ]
},
"pattern_scroll_panel@cartography.scroll_panel": {
"$grid_item_template": "cartography_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@cartography_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@cartography_pocket.inventory_panel": {
"layer": 2,
"bindings": [
{
"binding_type": "global",
"binding_name": "#is_left_tab_inventory",
"binding_name_override": "#visible"
}
]
}
}
]
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Left Navigation Tabs
//---------------------------------------------------------------------------
"left_tab_inventory@common_tabs.pocket_tab_left": {
"$tab_view_binding_name": "inventory_tab_toggle",
"$tab_content": "cartography_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, "100%" ],
"offset": [ 4, 0 ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"controls": [
{
"padding": {
"type": "panel",
"size": [ 0, "fill" ]
}
},
{
"left_tab_inventory@cartography_pocket.left_tab_inventory": {
"$is_bottom_most_tab": true
}
}
]
},
// #endregion
//---------------------------------------------------------------------------
// #region Base Panels
//---------------------------------------------------------------------------
"pocket_hotbar_and_content_panels@common.pocket_hotbar_and_content_panels": {
"$left_panel_control": "cartography_pocket.left_panel",
"$right_panel_control": "cartography_pocket.right_panel"
},
"cartography_panel": {
"type": "panel",
"controls": [
{ "pocket_hotbar_and_content_panels@cartography_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