1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-27 04:38:56 +00:00
bedrock-samples/resource_pack/ui/realmsPlus_screen.json
Mike Ammerlaan 8a7cb6d0b6 v1.20.60.4
2024-02-06 09:42:22 -08:00

719 lines
21 KiB
JSON

{
"namespace": "realmsPlus",
"realms_plus_pdp_screen@common.base_screen": {
"$ignore_inventory_button": "$is_sidebar_navigation_enabled",
"$screen_content": "realmsPlus.realmsPlus_main_panel",
"$header_safezone_control": "common_store.store_top_bar_filler",
"$header_bar_control": "common_store.store_top_bar",
"$screen_background_control": "realmsPlus.main_background",
"variables": [
{
"requires": "(not $use_animation)",
"$screen_animations": [
"@common.screen_exit_animation_no_offset"
],
"$background_animations": []
},
{
"requires": "($use_animation or (not $is_sidebar_navigation_enabled))",
"$screen_animations": [
"@common.screen_exit_animation_pop_offset",
"@common.screen_exit_animation_pop_fade"
],
"$background_animations": []
}
],
"$is_full_screen_layout": true,
"$fill_alpha": 1,
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
},
{
"from_button_id": "button.controller_secondary_select",
"to_button_id": "button.search",
"mapping_type": "global",
"ignored": "$is_on_3p_server"
},
{
"from_button_id": "button.controller_select",
"to_button_id": "button.coin_wallet",
"mapping_type": "global"
}
]
},
"realms_plus_upgrade_notice_screen@common.base_screen": {
"$ignore_inventory_button": "$is_sidebar_navigation_enabled",
"$screen_content": "realmsPlus.realmsPlus_main_panel",
"$header_safezone_control": "common_store.store_top_bar_filler",
"$header_bar_control": "common_store.store_top_bar",
"$screen_background_control": "realmsPlus.dark_blue_background",
"$is_full_screen_layout": true,
"$fill_alpha": 1,
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
},
{
"from_button_id": "button.controller_secondary_select",
"to_button_id": "button.search",
"mapping_type": "global",
"ignored": "$is_on_3p_server"
},
{
"from_button_id": "button.controller_select",
"to_button_id": "button.coin_wallet",
"mapping_type": "global"
}
]
},
"purple_background": {
"type": "image",
"texture": "textures/ui/verticalgradient",
"tiled": "x",
"controls": [
{
"bottom_left_particles": {
"type": "image",
"size": [ "20%", "133.33%x" ],
"texture": "textures/ui/particles2",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"layer": 1
}
},
{
"top_right_particles": {
"type": "image",
"size": [ "20%", "133.33%x" ],
"offset": [ 7, "5%" ],
"texture": "textures/ui/particles3",
"anchor_from": "top_right",
"anchor_to": "top_right",
"layer": 2
}
}
]
},
"main_background": {
"type": "panel",
"controls": [
{
"dark_blue@realmsPlus.dark_blue_background": {
"bindings": [
{
"binding_name": "(not #is_content_tab)",
"binding_name_override": "#visible"
}
]
}
},
{
"grey_gradient@csb.csb_background": {
"bindings": [
{
"binding_name": "#is_content_tab",
"binding_name_override": "#visible"
}
]
}
}
]
},
"dark_blue_background": {
"type": "image",
"texture": "textures/ui/white_background",
"color": "$store_realms-background-deep-blue",
"fill": true
},
"gradient_image_stack": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%" ],
"controls": [
{
"solid_pink": {
"type": "image",
"size": [ "51%", "100%" ],
"tiled": true,
"texture": "textures/ui/postGradientSolid"
}
},
{
"gradient": {
"type": "image",
"size": [ "fill", "100%" ],
"tiled": "y",
"texture": "textures/ui/purple_gradient"
}
}
]
},
"gradient_content_panel": {
"type": "panel",
"size": [ "100%", "100%" ],
"$gradient_content|default": "common.empty_panel",
"controls": [
{
"gradient@realmsPlus.gradient_image_stack": {
"size": [ "100% + 4px", "100%" ]
}
},
{
"content_panel@$gradient_content": {
"layer": 3
}
}
]
},
"realmsPlus_screen_main_panel@sidebar_navigation.sidebar_view": {
"$sidebar_main_view_content": "realmsPlus.dialog_content"
},
"realmsPlus_main_panel": {
"type": "panel",
"controls": [
{
"root_panel": {
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{
"main_panel@common_store.store_header_with_coins": {
"$child_control": "realmsPlus.realmsPlus_screen_main_panel",
"$back_button_has_title": true,
"$sidebar_ignore_page_loading": true,
"variables": [
{
"requires": "(not $pre_release)",
"$button_text": "store.realmsPlus"
},
{
"requires": "($pre_release and not $beta_build)",
"$button_text": "store.realmsPreview"
},
{
"requires": "($pre_release and $beta_build)",
"$button_text": "store.realmsBeta"
}
]
}
}
]
}
},
{
"popup_dialog_factory": {
"type": "factory",
"control_ids": {
"play_on_realm": "@realms_common.popup_dialog__play_on_realm"
}
}
}
]
},
"dialog_content": {
"type": "panel",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"controls": [
{ "selector_area@realmsPlus.selector_area": {} },
{ "content_area@realmsPlus.content_area": {} },
{ "left_right_pane_divider@realmsPlus.left_right_pane_divider": {} }
]
},
"selector_area": {
"type": "panel",
"size": [ "30% - 3px", "100%" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"layer": 2,
"focus_container": true,
"use_last_focus": true,
"$focus_navigation_mode_override_down|default": "contained",
"$focus_navigation_mode_override_up|default": "contained",
"$focus_navigation_mode_override_left|default": "",
"$focus_navigation_mode_override_right|default": "",
"focus_navigation_mode_down": "$focus_navigation_mode_override_down",
"focus_navigation_mode_up": "$focus_navigation_mode_override_up",
"focus_navigation_mode_left": "$focus_navigation_mode_override_left",
"focus_navigation_mode_right": "$focus_navigation_mode_override_right",
"controls": [
{
"scrolling_panel@common.scrolling_panel": {
"$scrolling_content": "realmsPlus.scrollable_selector_area_content",
"$show_background": false,
"$scroll_size": [ "5px", "100% - 4px" ],
"$scroll_bar_left_padding_size": [ 1, 0 ]
}
}
]
},
"scrollable_selector_area_content": {
"type": "stack_panel",
"offset": [ 4, 4 ],
"size": [ "100% - 4px", "100%c" ],
"controls": [
{ "realmsPlus_toggle@realmsPlus.realmsPlus_toggle": {} },
{ "content_toggle@realmsPlus.content_toggle": {} },
{ "faq_toggle@realmsPlus.faq_toggle": {} },
{
"toggle_section_divider@common.section_divider": {
"ignored": "$pre_release",
"$top_padding_size|default": [ "100%", 0 ],
"$bottom_padding_size|default": [ "100%", 4 ]
}
},
{
"buy_now_toggle@realmsPlus.buy_now_toggle": {
"ignored": "$pre_release",
"$focus_override_down": "FOCUS_OVERRIDE_STOP"
}
},
{
"xbl_btn_panel": {
"type": "panel",
"size": [ "100%", 20 ],
"debug": "red",
"controls": [
{
"xbl_btn@common_buttons.dark_text_button": {
"$button_text": "xbox.signin",
"$pressed_button_name": "button.signin",
"$font_type": "MinecraftTen",
"$anchor": "top_left",
"$default_button_texture": "textures/ui/realms_button_borderless_default",
"$hover_button_texture": "textures/ui/realms_button_borderless_hover",
"$pressed_button_texture": "textures/ui/realms_button_borderless_hover_pressed",
"$locked_button_texture": "textures/ui/realms_button_borderless_hover"
}
}
],
"bindings": [
{
"binding_name": "#sign_in_visible",
"binding_name_override": "#visible"
}
]
}
},
{
//hack for controller input so the buy now button can change which tab is focused without triggering the tab change on focus logic when we switch focus from the content area to the selector area
"focus_reset_input_panel": {
"type": "input_panel",
"focus_enabled": true,
"size": [ "100%", 4 ]
}
}
]
},
"section_toggle_base@common_toggles.light_text_toggle_collection": {
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", 20 ],
"$button_size_override": [ "100%", "100% + 1px" ],
"$button_type_panel": "realmsPlus.tab_button_text",
"$radio_toggle_group": true,
"$toggle_name": "navigation_tab",
"$toggle_group_default_selected": "$realmsPlus_toggle_index",
"$toggle_tab_focus_binding_type": "global",
"$toggle_tab_focus_binding_name": "#navigation_tab_focus_precedence",
"$toggle_on_hover_binding_type": "global",
"$toggle_on_hover_binding_name": "#toggle_on_hover"
},
"tab_button_text@common.minecraftTenLabel": {
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"size": [ "100% - 4px", "default" ],
"text": "$button_text",
"layer": 3,
"color": "$text_color",
"alpha": "$content_alpha",
"$button_text_binding_type|default": "none",
"$button_text_grid_collection_name|default": "",
"$button_text_binding_condition|default": "none",
"variables": [
{
"requires": "(not $is_low_memory_device and not $is_ps4)", // We don't load MinecraftTen in these cases so we need to revert to Mojangles.
"font_scale_factor": 1.2,
"offset": [ 0, -4 ] // Because of how the font is rendered it looks like it is offset down from the center of the render area
}
],
"bindings": [
{
"binding_type": "$button_text_binding_type",
"binding_condition": "$button_text_binding_condition",
"binding_collection_name": "$button_text_grid_collection_name",
"binding_name": "$button_text"
}
]
},
"toggle_base": {
"type": "stack_panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"toggle@realmsPlus.section_toggle_base": {
"$toggle_view_binding_name|default": "",
"$toggle_group_forced_index|default": "",
"$button_text|default": ""
}
},
{
"padding": {
"type": "panel",
"size": [ "100%", 4 ]
}
}
]
},
"realmsPlus_toggle@realmsPlus.toggle_base": {
"$toggle_view_binding_name": "realmsPlus_toggle",
"$toggle_group_forced_index": "$realmsPlus_toggle_index",
"variables": [
{
"requires": "(not $pre_release)",
"$button_text": "store.realmsPlus"
},
{
"requires": "($pre_release and not $beta_build)",
"$button_text": "store.realmsPreview"
},
{
"requires": "($pre_release and $beta_build)",
"$button_text": "store.realmsBeta"
}
],
"$focus_override_up": "search_header_text_box"
},
"content_toggle@realmsPlus.toggle_base": {
"$toggle_view_binding_name": "content_toggle",
"$toggle_group_forced_index": "$content_toggle_index",
"$button_text": "store.realmsPlus.content"
},
"faq_toggle@realmsPlus.toggle_base": {
"$toggle_view_binding_name": "faq_toggle",
"$toggle_group_forced_index": "$faq_toggle_index",
"$button_text": "store.realmsPlus.faq"
},
"buy_now_toggle@realmsPlus.toggle_base": {
"$toggle_view_binding_name": "buy_now_toggle",
"$toggle_group_forced_index": "$buy_now_toggle_index",
"$button_text": "store.realmsPlus.buyNow",
"$default_texture": "textures/ui/realms_button_borderless_default",
"$hover_texture": "textures/ui/realms_button_borderless_hover",
"$pressed_texture": "textures/ui/realms_button_borderless_hover_pressed",
"$pressed_no_hover_texture": "textures/ui/realms_button_borderless_hover",
"$default_text_color": "$dark_toggle_default_text_color",
"$default_checked_text_color": "$dark_toggle_hover_text_color",
"bindings": [
{
"binding_name": "#buy_visible",
"binding_name_override": "#visible"
}
]
},
"left_right_pane_divider": {
"type": "image",
"offset": [ "30%", -1 ],
"size": [ "4px", "100% + 2px" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"layer": 3,
"texture": "textures/ui/Banners"
},
// right side
"content_area": {
"type": "panel",
"offset": [ -2, 0 ],
"size": [ "70% - 8px", "100%" ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"layer": 1,
"focus_container": true,
"use_last_focus": false,
"$focus_navigation_mode_override_down|default": "contained",
"$focus_navigation_mode_override_up|default": "contained",
"$focus_navigation_mode_override_left|default": "",
"$focus_navigation_mode_override_right|default": "",
"focus_navigation_mode_down": "$focus_navigation_mode_override_down",
"focus_navigation_mode_up": "$focus_navigation_mode_override_up",
"focus_navigation_mode_left": "$focus_navigation_mode_override_left",
"focus_navigation_mode_right": "$focus_navigation_mode_override_right",
"controls": [
{
"control": {
"type": "stack_panel",
"size": [ "100%", "100%" ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"controls": [
{
"scrolling_panel@common.scrolling_panel": {
"size": [ "100%", "fill" ],
"$scrolling_content": "realmsPlus.section_content_panels",
"$show_background": false,
"$scroll_size": [ "5px", "100% - 8px" ],
"$scroll_bar_left_padding_size": [ 4, 0 ]
}
}
]
}
}
]
},
"section_content_panels": {
"type": "stack_panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "100%c" ],
"factory": {
"name": "toggle_section_factory",
"control_ids": {
"realmsPlus_tab": "@realmsPlus_landing.landing_content_section",
"content_tab": "@realmsPlus_content.realmsPlus_content_section",
"faq_tab": "@realmsPlus_faq.faq_content_section",
"buy_now_tab": "@realmsPlus.buy_now_content_section"
}
},
"bindings": [
{
"binding_name": "#section_content",
"binding_name_override": "#collection_length"
}
]
},
"content_section_top_padding": {
"type": "panel",
"size": [ "100%", 4 ]
},
"section_base": {
"type": "stack_panel",
"size": [ "100%", "100%c" ]
},
"buy_now_content_section@realmsPlus.section_base": {
"controls": [
{
"content_section_top_padding@realmsPlus.content_section_top_padding": {}
},
{
"content@realmsPlus_buy.buy_now_content": {}
}
]
},
"realms_default_animation": {
"anim_type": "flip_book",
"initial_uv": [ 0, 0 ],
"frame_count": 16,
"frame_step": 19,
"fps": 10,
"reversible": false
},
"realms_hover_animation": {
"anim_type": "flip_book",
"initial_uv": [ 0, 0 ],
"frame_count": 16,
"frame_step": 19,
"fps": 8,
"reversible": false
},
"realms_static_single_frame_animation": {
"anim_type": "flip_book",
"initial_uv": [ 0, 0 ],
"frame_count": 1,
"frame_step": 19,
"fps": 1,
"reversible": false
},
"markdown_background_animated": {
"type": "panel",
"size": [ "100%c", "100% + 4px" ],
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"controls": [
{
"realms_banner@realmsPlus.markdown_background": {
"size": [ "100%c", "100%" ],
"$banner_size": [ 13, "100%" ],
"$triangle_offset": [ 0, 0 ],
"$use_animated_icon": true,
"layer": 9
}
},
{
"realms_plus_normal": {
"type": "image",
"texture": "textures/ui/realms_plus_normal",
"size": [ 19, 19 ],
"uv_size": [ 19, 19 ],
"uv": "@realmsPlus.realms_default_animation",
"disable_anim_fast_forward": true,
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"layer": 15,
"offset": [ -2, 0 ],
"ignored": "$hover_state"
}
},
{
"realms_plus_hover": {
"type": "image",
"texture": "textures/ui/realms_plus_hover",
"size": [ 19, 19 ],
"uv_size": [ 19, 19 ],
"uv": "@realmsPlus.realms_default_animation",
"disable_anim_fast_forward": true,
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"layer": 15,
"offset": [ -2, 0 ],
"ignored": "(not $hover_state)"
}
}
]
},
"markdown_background": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%c", "100%" ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"$banner_size|default": [ 10, "100%" ],
"$pack_icon_size|default": [ 8, 10 ],
"$icon_color": "$store_sales_banner_text_color",
"$default_state|default": false,
"$hover_state|default": false,
"$pressed_state|default": false,
"$banner_texture": "textures/ui/realmflagSmooth",
"$triangle_texture": "textures/ui/realmflagtriangleSmooth",
"$triangle_offset": [ -1, 0 ],
"variables": [
{
"requires": "$pressed_state",
"$banner_offset": [ 0, -1 ],
"$triangle_offset": [ -1, -1 ]
}
],
"controls": [
{
"banner_panel": {
"type": "panel",
"size": [ "100%c", "100%" ],
"controls": [
{
"banner@common_store.markdown_banner": {
"size": [ "100%c", "100%" ],
"$banner_offset|default": [ 0, 0 ],
"offset": "$banner_offset",
"$use_animated_icon|default": false,
"layer": 1,
"controls": [
{
"banner_stack_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": "$banner_size",
"layer": 2,
"controls": "$banner_content"
}
}
],
"$banner_content|default": [
{
"realms_icon_panel": {
"type": "panel",
"size": "$banner_size",
"layer": 1,
"controls": [
{
"realms_icon": {
"type": "image",
"ignored": "$use_animated_icon",
"texture": "textures/ui/realmPortalSmall",
"size": "$pack_icon_size",
"layer": 1
}
}
]
}
}
]
}
}
]
}
},
{
"triangle_panel": {
"type": "panel",
"size": [ "100%c", "100%" ],
"controls": [
{
"triangle@common_store.markdown_triangle": {
"size": [ "50%y", "100%" ],
"offset": "$triangle_offset",
"layer": 2
}
}
]
}
}
]
},
"empty_label": {
"type": "panel",
"size": [ 0, "100%" ]
},
"full_width_section_divider@common.section_divider": {
"$divider_size": [ "100%", 1 ]
}
}