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

636 lines
20 KiB
JSON

{
"namespace": "tabbed_upsell",
//---------------------------------------------------------------------------
// Padding panels
//---------------------------------------------------------------------------
"padding_horizontal": {
"type": "panel",
"size": [ 2, "100%" ]
},
"padding_vertical": {
"type": "panel",
"size": [ "100%", 2 ]
},
"text_horizontal_padding": {
"type": "panel",
"size": [ 5, "100%" ]
},
//---------------------------------------------------------------------------
// Button panels content
//---------------------------------------------------------------------------
"tabbed_upsell_buy_now_button@common_buttons.light_content_button": {
"$pressed_button_name": "button.tabbed_buy_now_button",
"$button_content": "tabbed_upsell.tabbed_buy_now_label"
},
"tabbed_buy_now_label": {
"type": "panel",
"layer": 2,
"controls": [
{
"button_label": {
"type": "label",
"color": "$text_color",
"text": "trial.tabbed_upsell.button"
}
}
]
},
//---------------------------------------------------------------------------
// Text Panel
//---------------------------------------------------------------------------
"label_panel": {
"type": "panel",
"controls": [
{
"label_text": {
"type": "label",
"size": [ "100%", "default" ],
"$text_font_scale_factor|default": 0.9,
"font_scale_factor": "$text_font_scale_factor",
"font_type": "smooth",
"text": "$text",
"color": "$text_color"
}
}
]
},
"text_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100% - 2px", "default" ],
"controls": [
{
"tab_content_title_panel@tabbed_upsell.label_panel": {
"size": [ "100%", 13 ],
"$text": "$title_text",
"$text_color": "$main_header_text_color",
"$text_font_scale_factor": 1.33
}
},
{
"tab_content_description_panel@tabbed_upsell.label_panel": {
"size": [ "100%", "100%c" ],
"$text_color": "$body_text_color",
"$text": "$description_text"
}
},
{
"tab_content_description_panel_second@tabbed_upsell.label_panel": {
"ignored": "(not $multiline_description)",
"size": [ "100%", "100%c" ],
"$text_color": "$body_text_color",
"$text": "$description_text_line_2"
}
}
]
},
//---------------------------------------------------------------------------
// Image Panel
//---------------------------------------------------------------------------
"dialog_image": {
"type": "image",
"layer": 2,
"texture": "$texture",
"size": [ "100% - 2px", "100%" ]
},
"dialog_image_with_border": {
"type": "image",
"layer": 1,
"$background_texture|default": "textures/ui/Grey",
"texture": "$background_texture",
"controls": [
{
"dialog_image@tabbed_upsell.dialog_image": {}
}
]
},
"content_image_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%" ],
"controls": [
{
"minecraft_dialog_image_with_border@tabbed_upsell.dialog_image_with_border": {
"size": [ "40%", "100%" ]
}
},
{
"horizontal_padding_01@tabbed_upsell.text_horizontal_padding": {}
},
{
"scrolling_panel@common.scrolling_panel": {
"size": [ "60% - 5px", "100%" ],
"$scrolling_content": "tabbed_upsell.scroll_text",
"$show_background": false,
"$scroll_size": [ "5px", "100% - 4px" ],
"$scroll_bar_left_padding_size": [ 1, 0 ],
"layer": 3
}
}
]
},
"scroll_text@common.non_interact_focus_border_button": {
"$content_inside": "tabbed_upsell.text_panel",
"$border_size": [ "100%", "100%sm + 2px" ],
"size": [ "100%", "100%cm" ],
"$focus_id": "text_container"
},
"image_panel": {
"type": "panel",
"size": [ "100%", "100%" ],
"$focus_texture|default": "common.empty_panel",
"variables": [
{
"requires": "(($tab_state = checked_hover) or ($tab_state = checked))",
"$focus_texture": "common.focus_border_white"
}
],
"controls": [
{
"dialog_image_with_border@tabbed_upsell.dialog_image_with_border": {
"size": [ "100%", "100%" ]
}
},
{
"focus_image@$focus_texture": {}
}
]
},
//---------------------------------------------------------------------------
// Main navigation tabs
//---------------------------------------------------------------------------
"top_tab@common_tabs.tab_top": {
"$toggle_focus_enabled": false,
"$toggle_name": "navigation_tab",
"$toggle_group_default_selected": "$default_tab",
"$background_texture": "textures/ui/Black"
},
//---------------------------------------------------------------------------
// Tabs layout panels
//---------------------------------------------------------------------------
"tab_navigation_panel_layout": {
"type": "stack_panel",
"orientation": "horizontal",
"anchor_to": "top_left",
"anchor_from": "top_left",
"size": [ "100%", 16.8 ],
"controls": [
{
"navigation_tabs": {
"type": "panel",
"size": [ "100%", "100%" ],
"controls": [
{
"content@$navigation_tab": {
}
}
]
}
}
]
},
"common_tab_navigation_panel_layout": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%" ]
},
"tabbed_tab_navigation_panel_layout@tabbed_upsell.common_tab_navigation_panel_layout": {
"controls": [
{
"minecraft_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "minecraft_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 0,
"$texture": "textures/ui/tabbed_upsell_maingame_thumb",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_01@tabbed_upsell.padding_horizontal": {}
},
{
"xbl_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "xbl_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 1,
"$texture": "textures/ui/tabbed_upsell_xbox_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_02@tabbed_upsell.padding_horizontal": {}
},
{
"achievements_navigation_tab3@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "achievements_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 2,
"$texture": "textures/ui/tabbed_upsell_achievements_thumb",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_03@tabbed_upsell.padding_horizontal": {}
},
{
"multiplayer_navigation_tab4@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "multiplayer_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 3,
"$texture": "textures/ui/tabbed_upsell_multiplayer_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_04@tabbed_upsell.padding_horizontal": {}
},
{
"server_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "server_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 4,
"$texture": "textures/ui/tabbed_upsell_servers_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_05@tabbed_upsell.padding_horizontal": {}
},
{
"store_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "store_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 5,
"$texture": "textures/ui/tabbed_upsell_marketplace_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_06@tabbed_upsell.padding_horizontal": {}
},
{
"creative_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "creative_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 6,
"$texture": "textures/ui/tabbed_upsell_creative_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_07@tabbed_upsell.padding_horizontal": {}
},
{
"packs_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "packs_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 7,
"$texture": "textures/ui/tabbed_upsell_addons_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
},
{
"nav_padding_08@tabbed_upsell.padding_horizontal": {}
},
{
"seeds_navigation_tab@tabbed_upsell.top_tab": {
"size": [ "fill", "100%" ],
"$tab_view_binding_name": "seeds_navigation_tab_toggle",
"$radio_toggle_group": true,
"$toggle_group_forced_index": 8,
"$texture": "textures/ui/tabbed_upsell_seeds_thumbnail",
"$tab_panel": "tabbed_upsell.image_panel"
}
}
]
},
//---------------------------------------------------------------------------
// Content layout panels
//---------------------------------------------------------------------------
"tabbed_tab_content_panel_layout": {
"type": "panel",
"anchor_to": "bottom_middle",
"anchor_from": "bottom_middle",
"size": [ "100%", "fill" ],
"$multiline_description": false,
"controls": [
{
"minecraft_tab_content@tabbed_upsell.minecraft_tab_content_panel": {}
},
{
"xbl_tab_content2@tabbed_upsell.xbl_tab_content_panel": {}
},
{
"achievements_tab_content3@tabbed_upsell.achievements_tab_content_panel": {}
},
{
"multiplayer_tab_content4@tabbed_upsell.multiplayer_tab_content_panel": {}
},
{
"server_tab_content5@tabbed_upsell.server_tab_content_panel": {}
},
{
"store_tab_content6@tabbed_upsell.store_tab_content_panel": {}
},
{
"creative_tab_content7@tabbed_upsell.creative_tab_content_panel": {}
},
{
"packs_tab_content8@tabbed_upsell.packs_tab_content_panel": {}
},
{
"seeds_tab_content9@tabbed_upsell.seeds_tab_content_panel": {}
}
]
},
//---------------------------------------------------------------------------
// Content tabs panel
//---------------------------------------------------------------------------
"common_tab_content_panel": {
"type": "panel",
"controls": [
{
"content@$scroll_tab_content": {
"layer": 2,
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "100%" ]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "$visible_bind_toggle_source_control",
"source_property_name": "#toggle_state",
"target_property_name": "#visible"
}
]
},
"minecraft_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "minecraft_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_maingame",
"$title_text": "trial.tabbed_upsell.minecraft.title",
"$description_text": "trial.tabbed_upsell.minecraft.description"
},
"xbl_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "xbl_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_xbox",
"$title_text": "trial.tabbed_upsell.xbl.title",
"$description_text": "trial.tabbed_upsell.xbl.description",
"$multiline_description": true,
"$description_text_line_2": "trial.tabbed_upsell.xbl.description.line2"
},
"achievements_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "achievements_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_achievements",
"$title_text": "trial.tabbed_upsell.achievements.title",
"$description_text": "trial.tabbed_upsell.achievements.description"
},
"multiplayer_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "multiplayer_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_multiplayer",
"$title_text": "trial.tabbed_upsell.multiplayer.title",
"$description_text": "trial.tabbed_upsell.multiplayer.description"
},
"server_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "server_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_servers",
"$title_text": "trial.tabbed_upsell.server.title",
"$description_text": "trial.tabbed_upsell.server.description"
},
"store_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "store_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_marketplace",
"$title_text": "trial.tabbed_upsell.store.title",
"$description_text": "trial.tabbed_upsell.store.description"
},
"creative_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "creative_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_creative",
"$title_text": "trial.tabbed_upsell.creative.title",
"$description_text": "trial.tabbed_upsell.creative.description"
},
"packs_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "packs_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_add_ons",
"$title_text": "trial.tabbed_upsell.addon.title",
"$description_text": "trial.tabbed_upsell.addon.description"
},
"seeds_tab_content_panel@tabbed_upsell.common_tab_content_panel": {
"$visible_bind_toggle_source_control": "seeds_navigation_tab_toggle",
"$scroll_tab_content": "tabbed_upsell.content_image_panel",
"$texture": "textures/ui/tabbed_upsell_seeds",
"$title_text": "trial.tabbed_upsell.seeds.title",
"$description_text": "trial.tabbed_upsell.seeds.description"
},
//---------------------------------------------------------------------------
// Tab Panel
//---------------------------------------------------------------------------
"common_tab_screen_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100% - 4px", "100%" ],
"controls": [
{
"tab_navigation_panel@tabbed_upsell.tab_navigation_panel_layout": {}
},
{
"padding_01@tabbed_upsell.padding_vertical": {}
},
{
"tab_content_panel@$tab_content_panel": {}
}
]
},
"tabbed_screen_panel@tabbed_upsell.common_tab_screen_panel": {
"$navigation_tab": "tabbed_upsell.tabbed_tab_navigation_panel_layout",
"$tab_content_panel": "tabbed_upsell.tabbed_tab_content_panel_layout"
},
//---------------------------------------------------------------------------
// Button main Panel
//---------------------------------------------------------------------------
"button_panel": {
"type": "stack_panel",
"size": [ "100%", 29 ],
"orientation": "horizontal",
"controls": [
{
"padding_5@tabbed_upsell.padding_horizontal": {}
},
{
"buy_now_button@tabbed_upsell.tabbed_upsell_buy_now_button": {
"size": [ "100% - 4px", "100%" ],
"$focus_override_up": "text_container"
}
},
{
"padding_6@tabbed_upsell.padding_horizontal": {}
}
]
},
//---------------------------------------------------------------------------
// Tab main Panel
//---------------------------------------------------------------------------
"tab_panel": {
"type": "stack_panel",
"size": [ "100%", "fill" ],
"orientation": "horizontal",
"controls": [
{
"padding_3@tabbed_upsell.padding_horizontal": {}
},
{
"main_control@tabbed_upsell.tabbed_screen_panel": {}
},
{
"padding_4@tabbed_upsell.padding_horizontal": {}
}
]
},
"tabbed_Upsell_content": {
"type": "stack_panel",
"size": [ "100%", "100%" ],
"orientation": "vertical",
"controls": [
{
"padding_0@tabbed_upsell.padding_vertical": {}
},
{
"tab_panel@tabbed_upsell.tab_panel": {}
},
{
"padding_1@tabbed_upsell.padding_vertical": {}
},
{
"button_panel@tabbed_upsell.button_panel": {}
},
{
"padding_2@tabbed_upsell.padding_vertical": {}
}
]
},
//---------------------------------------------------------------------------
// Screen
//---------------------------------------------------------------------------
"tabbed_upsell_screen@common.base_screen": {
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
},
{
"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_animations": [
"@common.screen_exit_animation_push_fade",
"@common.screen_exit_animation_pop_fade",
"@common.screen_entrance_animation_push_fade",
"@common.screen_entrance_animation_pop_fade"
],
"$background_animations": [
"@common.screen_exit_animation_push_fade",
"@common.screen_exit_animation_pop_fade",
"@common.screen_entrance_animation_push_fade",
"@common.screen_entrance_animation_pop_fade"
],
"force_render_below": true,
"$screen_content": "tabbed_upsell.tabbed_upseel_screen_panel"
},
"tabbed_upseel_screen_panel": {
"type": "panel",
"controls": [
{
"tabbed_Upsell_screen_content@common_dialogs.main_panel_no_buttons": {
"size": "$tabbed_upsell_screen_size",
"$title_panel": "common_dialogs.standard_title_label",
"$text_name": "trial.tabbed_upsell.title",
"$child_control": "tabbed_upsell.tabbed_Upsell_content",
"$show_close_button": true,
"layer": 2
}
},
{
"background@common.screen_background": {
"alpha": 0.65,
"layer": 1
}
}
]
}
}