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/day_one_experience_intro_screen.json
Mike Ammerlaan a3b394c507 1.19.30
Initial layout
2022-09-23 06:24:26 -07:00

515 lines
16 KiB
JSON

{
"namespace": "day_one_experience_intro",
//---------------------------------------------------------------------------
// Padding panels
//---------------------------------------------------------------------------
"padding_horizontal": {
"type": "panel",
"size": [ 4, "100%" ]
},
"padding_vertical": {
"type": "panel",
"size": [ "100%", 8 ]
},
//---------------------------------------------------------------------------
// Text Panel
//---------------------------------------------------------------------------
"label_panel": {
"type": "panel",
"controls": [
{
"label_text": {
"type": "label",
"size": [ "100%", "default" ],
"text": "$text",
"text_alignment": "center",
"color": "$text_color"
}
}
]
},
"text_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "default" ],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"controls": [
{
"padding_00@day_one_experience_intro.padding_horizontal": {
"size": [ "5%", "fill" ]
}
},
{
"tab_content_description_panel@common.tts_label_focus_wrapper": {
"$tts_label_panel": "day_one_experience_intro.label_panel",
"$focus_border_size": [ "100% + 20px", "100% + 14px" ],
"size": [ "90%", "100%" ],
"$text_color": "$body_text_color",
"$text": "$description_text",
"anchor_from": "top_middle",
"anchor_to": "top_middle"
}
},
{
"padding_01@day_one_experience_intro.padding_horizontal": {
"size": [ "5%", "fill" ]
}
}
]
},
//---------------------------------------------------------------------------
// Image Panel
//---------------------------------------------------------------------------
"dialog_image": {
"type": "image",
"layer": 2,
"texture": "$texture",
"size": [ "100% - 2px", "100%" ],
"fill": true,
"$fit_to_width": true
},
"image_panel": {
"type": "panel",
"size": [ "100%", "100%" ],
"$focus_texture|default": "common.empty_panel",
"variables": [
{
"requires": "(($tab_state = checked_hover) or ($tab_state = checked) or ($tab_state = unchecked_hover))",
"$focus_texture": "common.focus_border_white"
}
],
"controls": [
{
"dialog_image_with_border@day_one_experience_intro.dialog_image": {
"size": [ "100%", "100%" ]
}
},
{
"focus_image@$focus_texture": {
"layer": 20
}
}
]
},
//---------------------------------------------------------------------------
// Main navigation tabs
//---------------------------------------------------------------------------
"top_tab@common_tabs.tab_top": {
"$toggle_focus_enabled": false,
"$toggle_name": "navigation_tab",
"$toggle_reset_on_focus_lost": false,
"$toggle_group_default_selected": "$default_tab",
"$background_texture": "textures/ui/Black",
"$toggle_tts_toggle_on_text": "accessibility.state.selected",
"$toggle_tts_toggle_off_text": ""
},
//---------------------------------------------------------------------------
// Tabs layout panels
//---------------------------------------------------------------------------
"common_tab_navigation_panel_layout": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%" ]
},
"tabbed_tab_navigation_panel_layout@day_one_experience_intro.common_tab_navigation_panel_layout": {
"$tab_size|default": [ "fill", "54%x" ],
"controls": [
{
"nav_padding_01@day_one_experience_intro.padding_horizontal": {}
},
{
"gamepad_helper_with_offset_left_bumper": {
"type": "panel",
"size": [ 25, "100%" ],
"controls": [
{
"gamepad_helper_left_bumper@common.gamepad_helper_left_bumper": {
"layer": 20,
"offset": [ 0, -7 ],
"anchor_from": "left_middle",
"anchor_to": "left_middle"
}
}
]
}
},
{
"nav_padding_02@day_one_experience_intro.padding_horizontal": {
"size": [ 2.5, "100%" ]
}
},
{
"welcome_navigation_tab@day_one_experience_intro.top_tab": {
"size": "$tab_size",
"$tab_view_binding_name": "welcome_navigation_tab_toggle",
"$toggle_group_forced_index": 0,
"$radio_toggle_group": true,
"$texture": "textures/ui/day_one_carousel_logo_thumb",
"$tab_panel": "day_one_experience_intro.image_panel",
"$top_tab_tts_name": "$tab_tts_name_welcome"
}
},
{
"nav_padding_03@day_one_experience_intro.padding_horizontal": {}
},
{
"marketplace_navigation_tab@day_one_experience_intro.top_tab": {
"size": "$tab_size",
"$tab_view_binding_name": "marketplace_navigation_tab_toggle",
"$toggle_group_forced_index": 1,
"$radio_toggle_group": true,
"$texture": "textures/ui/day_one_carousel_marketplace_thumb",
"$tab_panel": "day_one_experience_intro.image_panel",
"$top_tab_tts_name": "$tab_tts_name_marketplace"
}
},
{
"nav_padding_04@day_one_experience_intro.padding_horizontal": {}
},
{
"cross_platform_navigation_tab@day_one_experience_intro.top_tab": {
"size": "$tab_size",
"$tab_view_binding_name": "cross_platform_navigation_tab_toggle",
"$toggle_group_forced_index": 2,
"$radio_toggle_group": true,
"$texture": "textures/ui/day_one_carousel_cross_platform_thumb",
"$tab_panel": "day_one_experience_intro.image_panel",
"$top_tab_tts_name": "$tab_tts_name_cross_platform"
}
},
{
"nav_padding_05@day_one_experience_intro.padding_horizontal": {}
},
{
"realms_navigation_tab@day_one_experience_intro.top_tab": {
"size": "$tab_size",
"$tab_view_binding_name": "realms_navigation_tab_toggle",
"$toggle_group_forced_index": 3,
"$radio_toggle_group": true,
"$texture": "textures/ui/day_one_carousel_realms_thumb",
"$tab_panel": "day_one_experience_intro.image_panel",
"ignored": "(not $is_realms_enabled)",
"$top_tab_tts_name": "$tab_tts_name_realms"
}
},
{
"nav_padding_06@day_one_experience_intro.padding_horizontal": {
"ignored": "(not $is_realms_enabled)"
}
},
{
"villagers_navigation_tab@day_one_experience_intro.top_tab": {
"size": "$tab_size",
"$tab_view_binding_name": "villager_navigation_tab_toggle",
"$toggle_group_forced_index": 4,
"$radio_toggle_group": true,
"$texture": "textures/ui/day_one_carousel_villager_thumb",
"$tab_panel": "day_one_experience_intro.image_panel",
"$top_tab_tts_name": "$tab_tts_name_villagers"
}
},
{
"nav_padding_07@day_one_experience_intro.padding_horizontal": {}
},
{
"gamepad_helper_with_offset_right_bumper": {
"type": "panel",
"size": [ 25, "100%" ],
"controls": [
{
"gamepad_helper_right_bumper@common.gamepad_helper_right_bumper": {
"layer": 20,
"offset": [0,-7],
"anchor_from": "right_middle",
"anchor_to": "right_middle"
}
}
]
}
},
{
"nav_padding_08@day_one_experience_intro.padding_horizontal": {}
}
]
},
//---------------------------------------------------------------------------
// Content layout panels
//---------------------------------------------------------------------------
"tab_header_image_panel": {
"type": "panel",
"anchor_to": "top_middle",
"anchor_from": "top_middle",
"size": [ "100%", "30%x" ],
"controls": [
{
"welcome_tab_content@day_one_experience_intro.welcome_tab_header_image_panel": {}
},
{
"marketplace_tab_content@day_one_experience_intro.marketplace_tab_header_image_panel": {}
},
{
"cross_platform_tab_content@day_one_experience_intro.cross_platform_tab_header_image_panel": {}
},
{
"realms_tab_content@day_one_experience_intro.realms_tab_header_image_panel": {
"ignored": "(not $is_realms_enabled)"
}
},
{
"villager_tab_content@day_one_experience_intro.villager_tab_header_image_panel": {}
}
]
},
"tabbed_tab_content_panel_layout": {
"type": "panel",
"anchor_to": "bottom_middle",
"anchor_from": "bottom_middle",
"controls": [
{
"welcome_tab_content@day_one_experience_intro.welcome_tab_content_panel": {}
},
{
"marketplace_tab_content@day_one_experience_intro.marketplace_tab_content_panel": {}
},
{
"cross_platform_tab_content@day_one_experience_intro.cross_platform_tab_content_panel": {}
},
{
"realms_tab_content@day_one_experience_intro.realms_tab_content_panel": {
"ignored": "(not $is_realms_enabled)"
}
},
{
"villager_tab_content@day_one_experience_intro.villager_tab_content_panel": {}
}
]
},
//---------------------------------------------------------------------------
// Content tabs panel
//---------------------------------------------------------------------------
"common_tab_header_image_panel": {
"type": "panel",
"controls": [
{
"header_image": {
"type": "image",
"layer": 2,
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100% - 1px", "100% - 1px" ],
"fill": true,
"texture": "$header_texture"
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "$visible_bind_toggle_source_control",
"source_property_name": "#toggle_state",
"target_property_name": "#visible"
}
]
},
"common_tab_content_panel": {
"type": "panel",
"controls": [
{
"content@$scroll_tab_content": {
"layer": 2,
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"size": [ "100%", "100%" ]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "$visible_bind_toggle_source_control",
"source_property_name": "#toggle_state",
"target_property_name": "#visible"
}
]
},
"welcome_tab_header_image_panel@day_one_experience_intro.common_tab_header_image_panel": {
"$visible_bind_toggle_source_control": "welcome_navigation_tab_toggle",
"$header_texture": "textures/ui/day_one_carousel_logo"
},
"welcome_tab_content_panel@day_one_experience_intro.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "welcome_navigation_tab_toggle",
"$scroll_tab_content": "day_one_experience_intro.text_panel",
"$description_text|default": "dayOneExperience.carousel.welcome_text",
"variables": [
{
"requires": "(not $is_realms_enabled)",
"$description_text": "dayOneExperience.carousel.welcome_text.no_realms"
}
]
},
"marketplace_tab_header_image_panel@day_one_experience_intro.common_tab_header_image_panel": {
"$visible_bind_toggle_source_control": "marketplace_navigation_tab_toggle",
"$header_texture": "textures/ui/day_one_carousel_marketplace"
},
"marketplace_tab_content_panel@day_one_experience_intro.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "marketplace_navigation_tab_toggle",
"$scroll_tab_content": "day_one_experience_intro.text_panel",
"$description_text": "dayOneExperience.carousel.marketplace"
},
"cross_platform_tab_header_image_panel@day_one_experience_intro.common_tab_header_image_panel": {
"$visible_bind_toggle_source_control": "cross_platform_navigation_tab_toggle",
"$header_texture": "textures/ui/day_one_carousel_cross_platform"
},
"cross_platform_tab_content_panel@day_one_experience_intro.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "cross_platform_navigation_tab_toggle",
"$scroll_tab_content": "day_one_experience_intro.text_panel",
"$description_text": "dayOneExperience.carousel.cross_platform"
},
"realms_tab_header_image_panel@day_one_experience_intro.common_tab_header_image_panel": {
"$visible_bind_toggle_source_control": "realms_navigation_tab_toggle",
"$header_texture": "textures/ui/day_one_carousel_realms",
"ignored": "(not $is_realms_enabled)"
},
"realms_tab_content_panel@day_one_experience_intro.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "realms_navigation_tab_toggle",
"$scroll_tab_content": "day_one_experience_intro.text_panel",
"$description_text": "dayOneExperience.carousel.realms",
"ignored": "(not $is_realms_enabled)"
},
"villager_tab_header_image_panel@day_one_experience_intro.common_tab_header_image_panel": {
"$visible_bind_toggle_source_control": "villager_navigation_tab_toggle",
"$header_texture": "textures/ui/day_one_carousel_villager"
},
"villager_tab_content_panel@day_one_experience_intro.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "villager_navigation_tab_toggle",
"$scroll_tab_content": "day_one_experience_intro.text_panel",
"$description_text": "dayOneExperience.carousel.villager"
},
//---------------------------------------------------------------------------
// Tab main Panel
//---------------------------------------------------------------------------
"tab_panel": {
"type": "stack_panel",
"size": [ "100%", "100%" ],
"orientation": "vertical",
"controls": [
{
"tab_header_image@day_one_experience_intro.tab_header_image_panel": {}
},
{
"padding_00@day_one_experience_intro.padding_vertical": {}
},
{
"tab_navigation_panel@day_one_experience_intro.tabbed_tab_navigation_panel_layout": {
"size": [ "100%", "18%" ],
"ttsSectionContainer": true
}
},
{
"tab_content_panel@day_one_experience_intro.tabbed_tab_content_panel_layout": {
"size": [ "100%", "fill" ],
"ttsSectionContainer": true
}
},
{
"padding_4@day_one_experience_intro.padding_vertical": {}
},
{
"continue_button_panel": {
"type": "panel",
"size": [ "100%", "fill" ],
"ttsSectionContainer": true,
"controls": [
{
"continue_button@common_buttons.light_text_button": {
"anchor_to": "bottom_middle",
"anchor_from": "bottom_middle",
"offset": [ 0, -2.5 ],
"size": [ "98%", 28 ],
"$pressed_button_name": "button.next_page",
"$button_text": "gui.continue",
"$focus_id": "continue_button"
}
}
]
}
}
]
},
//---------------------------------------------------------------------------
// Screen
//---------------------------------------------------------------------------
"day_one_experience_intro_screen@common.base_screen": {
"button_mappings": [
{
"from_button_id": "button.menu_tab_left",
"to_button_id": "button.menu_tab_left",
"mapping_type": "global",
"scope": "view"
},
{
"from_button_id": "button.menu_tab_right",
"to_button_id": "button.menu_tab_right",
"mapping_type": "global",
"scope": "view"
}
],
"$screen_content": "day_one_experience_intro.day_one_experience_intro_screen_content"
},
"day_one_experience_intro_screen_content": {
"type": "panel",
"controls": [
{
"welcome_dialog@common_dialogs.main_panel_no_buttons": {
"$show_close_button": false,
"size": "$day_one_experience_intro_screen_size",
"$title_panel": "common_dialogs.standard_title_label",
"$text_name": "dayOneExperience.carousel.title",
"$child_control": "day_one_experience_intro.tab_panel",
"layer": 2
}
}
]
}
}