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/profile_card.json
Mike Ammerlaan 1c48a87a35 v1.21.20.3
2024-08-13 09:36:05 -07:00

1117 lines
29 KiB
JSON

/********************************************************
+* (c) Mojang. All rights reserved *
+* (c) Microsoft. All rights reserved. *
+*********************************************************/
{
"namespace": "profile_card",
"online_image": {
"type": "image",
"texture": "textures/ui/online",
"size": [ 7, 7 ]
},
"offline_image": {
"type": "image",
"texture": "textures/ui/offline",
"size": [ 7, 7 ]
},
"gamer_score_icon": {
"type": "image",
"texture": "textures/ui/gamerscore",
"size": [ 11, 11 ]
},
"dropdown_border_line": {
"type": "image",
"texture": "textures/ui/whiteline",
"color": "$dropdown_divider_color",
"tiled": true
},
"hammer_l_icon": {
"type": "image",
"texture": "textures/ui/hammer_l",
"size": [ 15, 15 ]
},
"hammer_r_icon": {
"type": "image",
"texture": "textures/ui/hammer_r",
"size": [ 15, 15 ]
},
"unfriend_x_icon_default": {
"type": "image",
"texture": "textures/ui/x_dropdown_default",
"size": [ 9, 9 ]
},
"unfriend_x_icon_hover": {
"type": "image",
"texture": "textures/ui/x_dropdown_hover",
"size": [ 9, 9 ]
},
"player_gamer_pic": {
"type": "image",
"size": [ 32, 32 ],
"layer": 1,
"bindings": [
{
"binding_name": "#texture_path",
"binding_name_override": "#texture"
},
{
"binding_name": "#texture_location_type",
"binding_name_override": "#texture_file_system"
}
],
"controls": [
{
"player_panel_black_border@common.square_image_border_white": {
"size": [ "100% + 2px", "100% + 2px" ],
"color": [ 0, 0, 0 ],
"anchor_from": "center",
"anchor_to": "center"
}
}
]
},
"player_platform_pic": {
"type": "image",
"size": [ 32, 32 ],
"layer": 1,
"texture": "textures/ui/gamerpic",
"bindings": [
{
"binding_name": "#platform_picture_path",
"binding_name_override": "#texture"
},
{
"binding_name": "#texture_location_type",
"binding_name_override": "#texture_file_system"
}
],
"controls": [
{
"player_panel_black_border@common.square_image_border_white": {
"size": [ "100% + 2px", "100% + 2px" ],
"color": [ 0, 0, 0 ],
"anchor_from": "center",
"anchor_to": "center"
}
}
]
},
"player_gamer_pic_panel": {
"type": "panel",
"size": [ "100%c + 2px", "100%c + 2px" ],
"controls": [
{
"player_gamer_pic@profile_card.player_gamer_pic": {}
}
]
},
"player_platform_pic_panel": {
"type": "panel",
"size": [ "100%c + 2px", "100%c + 2px" ],
"controls": [
{
"player_platform_pic@profile_card.player_platform_pic": {}
}
]
},
"x_radio_visuals": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", 20 ],
"$alpha|default": 1.0,
"$radio_label_bindings|default": [],
"$radio_label_color|default": "$main_header_text_color",
"controls": [
{
"padding_0": {
"type": "panel",
"size": [ 1, "100%" ]
}
},
{
"icon_panel": {
"type": "panel",
"size": [ 9, "100%" ],
"controls": [
{
"texture_icon": {
"type": "image",
"texture": "$icon_texture",
"size": [ 9, 9 ]
}
}
]
}
},
{
"padding_1": {
"type": "panel",
"size": [ 6, "100%" ]
}
},
{
"label_panel": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"radio_label": {
"type": "label",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"text": "$radio_label_text",
"color": "$radio_label_color",
"offset": [ 0, 0.5 ],
"size": [ "100% - 4px", "default" ],
"alpha": "$alpha",
"bindings": "$radio_label_bindings"
}
}
]
}
}
]
},
"x_default_state@profile_card.x_radio_visuals": {
"$icon_texture": "textures/ui/x_dropdown_default"
},
"x_hover_state@profile_card.x_radio_visuals": {
"$icon_texture": "textures/ui/x_dropdown_hover"
},
"gamer_score_label": {
"type": "label",
"text": "#gamer_score",
"layer": 2,
"color": "$body_text_color",
"bindings": [
{
"binding_name": "#gamer_score"
}
]
},
"profile_labels": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"gamertag_label": {
"type": "label",
"size": [ "100%", "default" ],
"offset": [ 0, 2 ],
"text": "#gamertag",
"layer": 2,
"color": "$body_text_color",
"anchor_from": "top_left",
"anchor_to": "top_left",
"bindings": [
{
"binding_name": "#gamertag"
}
]
}
},
{
"gamer_score_panel": {
"type": "stack_panel",
"size": [ "100%", 11 ],
"offset": [ 0, -2 ],
"orientation": "horizontal",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"controls": [
{
"gamer_score_icon@profile_card.gamer_score_icon": {}
},
{
"padding_0": {
"type": "panel",
"size": [ 2, "100%" ]
}
},
{
"gamer_score_panel": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"gamer_score@profile_card.gamer_score_label": {
"size": [ "100%", "default" ],
"offset": [ 0, 1 ],
"anchor_from": "top_left",
"anchor_to": "top_left"
}
}
]
}
}
]
}
}
]
},
"online_indicator": {
"type": "panel",
"size": [ 7, "100%" ],
"controls": [
{
"online@profile_card.online_image": {
"offset": [ 0, 3 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"bindings": [
{
"binding_name": "#player_online",
"binding_name_override": "#visible"
}
]
}
},
{
"offline@profile_card.offline_image": {
"offset": [ 0, 3 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"bindings": [
{
"binding_name": "#player_offline",
"binding_name_override": "#visible"
}
]
}
}
]
},
"platform_indicator": {
"type": "panel",
"size": [ 11, 11 ]
},
"presence_info": {
"type": "stack_panel",
"size": [ "100%c", "100%" ],
"orientation": "horizontal",
"controls": [
{
"online_indicator@profile_card.online_indicator": {
"bindings": [
{
"binding_name": "(not #platform_info_visible)",
"binding_name_override": "#visible"
}
]
}
},
{
"platform_indicator@profile_card.platform_indicator": {}
}
]
},
"profile_info": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", 34 ],
"controls": [
{
"profile_pic@profile_card.player_gamer_pic_panel": {}
},
{
"padding_0": {
"type": "panel",
"size": [ 2, "100%" ]
}
},
{
"profile_labels@profile_card.profile_labels": {}
},
{
"presence_info@profile_card.presence_info": {}
}
]
},
"platform_info": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", 34 ],
"controls": [
{
"profile_pic@profile_card.player_platform_pic_panel": {}
},
{
"padding_0": {
"type": "panel",
"size": [ 2, "100%" ]
}
},
{
"platform_labels": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"platform_label": {
"type": "label",
"size": [ "100% - 30px", "default" ],
"offset": [ 0, 2 ],
"text": "#platform_name",
"layer": 2,
"color": "$body_text_color",
"anchor_from": "top_left",
"anchor_to": "top_left",
"bindings": [
{
"binding_name": "#platform_name"
}
]
}
},
{ "platform_icon_panel@profile_card.platform_icon_panel": {} },
{
"online_indicator@profile_card.online_image": {
"size": [ 7, "100%" ],
"offset": [ -3, -10 ],
"anchor_from": "right_middle",
"anchor_to": "right_middle"
}
}
]
}
}
]
},
"platform_icon_panel": {
"type": "panel",
"size": [ 15, 15 ],
"anchor_to": "right_middle",
"anchor_from": "right_middle",
"offset": [ -15, -10 ],
"controls": [
{
"platform_icon": {
"type": "image",
"ignored": "(not $xbl_platform_icons_visible)",
"texture": "textures/ui/platform_icon",
"layer": 1,
"size": [ "100%-2px", "100%-2px" ]
}
}
]
},
"add_friend_dropdown_panel": {
"type": "stack_panel",
"size": [ "100% - 12px", "100%" ],
"orientation": "horizontal",
"controls": [
{
"label_panel": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"add_friend_label@profile_card.add_friend_label": {}
}
]
}
},
{
"arrow_panel": {
"type": "panel",
"layer": 1,
"size": [ "100%c", "100%" ],
"controls": [
{
"arrow@settings_common.arrow_image": {}
}
]
}
}
]
},
"add_friend_label@common.new_button_label": {
"layer": 2,
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"size": [ "100%", "default" ],
"text": "$options_dropdown_toggle_label_binding",
"alpha": "$alpha",
"bindings": [
{
"binding_name": "$options_dropdown_toggle_label_binding",
"binding_condition": "none"
}
]
},
"platform_dialog_scrolling_content": {
"type": "stack_panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"padding_0": {
"type": "panel",
"size": [ "100%", 2 ]
}
},
{
"platform_info@profile_card.platform_info": {}
},
{
"padding_1": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"title_presence_info": {
"type": "label",
"size": [ "100%", "default" ],
"min_size": [ "100%", 20 ],
"text": "profile.platform.currentlyPlaying",
"color": "$body_text_color",
"bindings": [
{
"binding_name": "(not #xbl_info_visible)",
"binding_name_override": "#visible"
}
]
}
}
],
"bindings": [
{
"binding_name": "#platform_info_visible",
"binding_name_override": "#visible"
}
]
},
"xbl_dialog_scrolling_content": {
"type": "stack_panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"padding_0": {
"type": "panel",
"size": [ "100%", 2 ]
}
},
{
"profile_info@profile_card.profile_info": {}
},
{
"padding_1": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"title_presence_info": {
"type": "label",
"size": [ "100%", "default" ],
"min_size": [ "100%", 20 ],
"text": "#currently_playing",
"color": "$body_text_color",
"bindings": [
{
"binding_name": "#currently_playing"
},
{
"binding_name": "#currently_playing_visible",
"binding_name_override": "#visible"
}
]
}
},
{
"padding_2": {
"type": "panel",
"size": [ "100%", 2 ],
"bindings": [
{
"binding_name": "#currently_playing_visible",
"binding_name_override": "#visible"
}
]
}
},
{
"add_friend_button@common_buttons.light_text_button": {
"size": [ "100%", 30 ],
"ignored": "$is_current_profile",
"$pressed_button_name": "button.add_friend",
"$button_text": "#add_friend_button_text",
"$button_text_binding_type": "global",
"$button_binding_condition": "once",
"bindings": [
{
"binding_name": "(#add_friend_button_visible)",
"binding_name_override": "#visible"
},
{
"binding_name": "#add_friend_button_text"
}
],
"variables": [
{
"requires": "($nx_os or $is_ps4)",
"$focus_override_down": "mute_option"
}
]
}
},
{
"remove_friend_button@common_buttons.light_text_button": {
"size": [ "100%", 30 ],
"ignored": "($is_current_profile or (not $nx_os and not $is_ps4))",
"$pressed_button_name": "button.remove_friend",
"$button_text": "#remove_friend_button_text",
"$button_text_binding_type": "global",
"$button_binding_condition": "once",
"$focus_override_down": "mute_option",
"bindings": [
{
"binding_name": "(#remove_friend_button_visible)",
"binding_name_override": "#visible"
},
{
"binding_name": "#remove_friend_button_text"
}
]
}
},
{
"adding_friend_progress_bars": {
"type": "image",
"texture": "textures/ui/mainbanners",
"size": [ "100%", 30 ],
"controls": [
{
"searching_bars@common_store.progress_loading_spinner": {
"size": [ "10px", "10px" ],
"anchor_from": "center",
"anchor_to": "center"
}
}
],
"bindings": [
{
"binding_name": "#add_remove_in_progress",
"binding_name_override": "#visible"
}
]
}
},
{
"padding_3": {
"type": "panel",
"size": [ "100%", 4 ],
"ignored": "$is_current_profile",
"bindings": [
{
"binding_name": "(not #is_friend)",
"binding_name_override": "#visible"
}
]
}
},
{
"dropdown_visibility_panel": {
"type": "panel",
"size": [ "100%", "100%c" ],
"ignored": "($is_current_profile or $nx_os or $is_ps4)",
"$focus_override_down": "mute_option",
"controls": [
{
"friends_dropdown@settings_common.option_dropdown": {
"$button_content": "profile_card.add_friend_dropdown_panel",
"$show_option_label": false,
"$option_label": "#friend_status_dropdown_toggle_label",
"$dropdown_content": "profile_card.add_friend_dropdown_content",
"$dropdown_area": "dialog_content",
"$dropdown_name": "add_friend_dropdown",
"$options_dropdown_toggle_label_binding": "#friend_status_dropdown_toggle_label",
"$dropdown_scroll_content_size": [ "100%", 112 ]
}
}
],
"bindings": [
{
"binding_name": "#is_friend",
"binding_name_override": "#visible"
}
]
}
},
{
"real_name_message": {
"type": "label",
"text": "xbox.profile.realName",
"color": "$body_text_color",
"size": [ "100%", "default" ]
}
},
{
"padding_4": {
"type": "panel",
"size": [ "100%", 4 ],
"ignored": "$is_current_profile"
}
},
{
"mute_option@profile_card.toggle_option": {
"$toggle_label": "xbox.profile.mute",
"$option_binding_name": "#mute_player",
"$toggle_name": "mute_player",
"ignored": "$is_current_profile",
"$focus_id": "mute_option"
}
},
{
"padding_5": {
"type": "panel",
"size": [ "100%", 4 ],
"ignored": "$is_current_profile"
}
},
{
"block_option@profile_card.toggle_option": {
"$toggle_label": "xbox.profile.block",
"$option_binding_name": "#block_player",
"$toggle_name": "block_player",
"ignored": "$is_current_profile"
}
},
{
"padding_6": {
"type": "panel",
"size": [ "100%", 4 ],
"ignored": "$is_current_profile"
}
},
{
"report_button@common_buttons.dark_content_button": {
"size": [ "100%", 30 ],
"ignored": "$is_current_profile",
"$pressed_button_name": "button.report",
"$button_content": "profile_card.report_button_content"
}
},
{
"padding_7": {
"type": "panel",
"size": [ "100%", 2 ]
}
}
],
"bindings": [
{
"binding_name": "#xbl_info_visible",
"binding_name_override": "#visible"
}
]
},
"dialog_scrolling_content": {
"type": "stack_panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"platform_profile_info@profile_card.platform_dialog_scrolling_content": {}
},
{
"xbl_profile_info@profile_card.xbl_dialog_scrolling_content": {}
}
]
},
"toggle_option": {
"type": "stack_panel",
"size": [ "100%", 16 ],
"orientation": "horizontal",
"$toggle_label|default": "",
"$option_binding_name|default": "",
"$toggle_name|default": "",
"$option_enabled_binding_name|default": "",
"$enabled|default": true,
"$toggle_tts_header": "$toggle_label",
"controls": [
{
"label_panel": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"toggle_label": {
"type": "label",
"size": [ "100%", "default" ],
"layer": 1,
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"text": "$toggle_label",
"color": "$main_header_text_color"
}
}
]
}
},
{
"profile_option_toggle@settings_common.option_toggle_control": {
"size": [ "100%c", "100%c" ]
}
}
]
},
"report_button_content": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100% - 8px", "100%" ],
"controls": [
{
"hammer_icon_panel_l": {
"type": "panel",
"size": [ "100%c", "100%" ],
"controls": [
{
"hammer@profile_card.hammer_l_icon": {}
}
]
}
},
{
"report_label": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"report_label": {
"type": "label",
"size": [ "default", "default" ],
"color": "$body_text_color",
"text": "xbox.profile.report"
}
}
]
}
},
{
"hammer_icon_panel_r": {
"type": "panel",
"size": [ "100%c", "100%" ],
"controls": [
{
"hammer@profile_card.hammer_r_icon": {}
}
]
}
}
]
},
"unfriend_button_panel": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%" ],
"controls": [
{
"x_icon@profile_card.unfriend_x_icon": {}
},
{
"padding": {
"type": "panel",
"size": [ 2, "100%" ]
}
},
{
"text_label": {
"type": "label",
"text": "xbox.profile.removeFriend",
"size": [ "fill", "100%" ],
"color": "$body_text_color"
}
}
]
},
"add_friend_dropdown_content@settings_common.option_radio_dropdown_group": {
"size": [ "100%", "100%c" ],
"offset": [2, 0],
"$show_option_label": false,
"$radio_buttons": [
{
"friend@settings_common.radio_with_label": {
"$toggle_state_binding_name": "#friend_option",
"$radio_label_text": "xbox.profile.friend"
}
},
{
"friend_helper_panel": {
"type": "input_panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"friend_helper_text": {
"type": "label",
"size": [ "100% - 4px", "default" ],
"text": "#friend_helper_text",
"font_type": "smooth",
"font_scale_factor": 1.333,
"shadow": false,
"bindings": [
{
"binding_name": "#friend_helper_text"
}
]
}
},
{
"padding_0": {
"type": "panel",
"size": [ "100%", 4 ]
}
}
]
}
},
{
"favorite@settings_common.radio_with_label": {
"$toggle_state_binding_name": "#favorite_option",
"$radio_label_text": "xbox.profile.favorite"
}
},
{
"favorite_helper_panel": {
"type": "input_panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"favorite_helper_text": {
"type": "label",
"size": [ "100% - 4px", "default" ],
"text": "xbox.profile.favoriteHelperText",
"font_type": "smooth",
"font_scale_factor": 1.333,
"shadow": false
}
},
{
"padding_1": {
"type": "panel",
"size": [ "100%", 4 ]
}
}
]
}
},
{
"border_panel": {
"type": "input_panel",
"size": [ "100%", 3 ],
"controls": [
{
"border@profile_card.dropdown_border_line": {
"size": [ "100% + 2px", 3 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [ -2, 0 ]
}
},
{
"padding_2": {
"type": "panel",
"size": [ "100%", 2 ]
}
}
]
}
},
{
"remove_friend@settings_common.radio_with_label": {
"size": [ "100%", 20 ],
"$toggle_state_binding_name": "#remove_friend_option",
"$radio_label_text": "xbox.profile.removeFriend",
"$unchecked_control": "profile_card.x_default_state",
"$checked_control": "profile_card.x_default_state",
"$unchecked_hover_control": "profile_card.x_hover_state",
"$checked_hover_control": "profile_card.x_hover_state",
"$unchecked_locked_control": "profile_card.x_default_state",
"$unchecked_locked_hover_control": "profile_card.x_default_state",
"$checked_locked_control": "profile_card.x_default_state",
"$checked_locked_hover_control": "profile_card.x_default_state"
}
}
]
},
"dialog_content@common.scrolling_panel": {
"anchor_to": "top_left",
"anchor_from": "top_left",
"$show_background": false,
"size": [ "100%", "100%" ],
"offset": [ 2, 0 ],
"$scrolling_content": "profile_card.dialog_scrolling_content",
"$scroll_size": [ 5, "100% - 4px" ],
"$scrolling_pane_size": [ "100% - 4px", "100%" ],
"$scroll_bar_right_padding_size": [ 0, 0 ]
},
"dialog_content_with_skin": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%" ],
"controls": [
{
"skin_pane": {
"type": "input_panel",
"size": [ "35% + 1px", "100%" ],
"ignored": "$hide_skin",
"gesture_tracking_button": "button.turn_doll",
"button_mappings": [
{
"from_button_id": "button.menu_select",
"to_button_id": "button.turn_doll",
"mapping_type": "pressed",
"button_up_right_of_first_refusal": true
}
],
"controls": [
{
"paper_doll_panel": {
"type": "panel",
"size": [ "100%", "100% - 10px" ],
"offset": [ 0, -35 ],
"controls": [
{
"paper_doll": {
"type": "custom",
"renderer": "paper_doll_renderer",
"size": [ "100%", "100%" ],
"layer": 2,
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"rotation": "gesture_x",
"use_uuid": true,
"use_selected_skin": false,
"animation_reset_name": "screen_animation_reset",
"anims": [
"@common.screen_exit_size_animation_push",
"@common.screen_exit_size_animation_pop",
"@common.screen_entrance_size_animation_push",
"@common.screen_entrance_size_animation_pop"
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "skin_pane",
"source_property_name": "#gesture_mouse_delta_x",
"target_property_name": "#gesture_mouse_delta_x"
},
{
"binding_name": "#player_uuid"
}
]
}
}
]
}
}
]
}
},
{
"divider_padding": {
"type": "panel",
"size": [ 6, "100%" ],
"ignored": "$hide_skin"
}
},
{
"profile_panel": {
"type": "panel",
"size": [ "fill", "100%" ],
"controls": [
{
"dialog_content@profile_card.dialog_content": {}
}
]
}
}
]
},
"main_panel": {
"type": "input_panel",
"controls": [
{
"dialog@common_dialogs.main_panel_no_buttons": {
"$text_name": "options.profile",
"$child_control": "profile_card.dialog_content_with_skin",
"size": "$dialog_size",
"max_size": "$dialog_max_size",
"$show_divider": "(not $hide_skin)",
"$divider_offset": [ "35% + 4px", "22px" ]
}
}
],
"variables": [
{
"requires": "(not $hide_skin)",
"$dialog_size": [ 300, 235 ],
"$dialog_max_size": [ 300, "100% - 4px" ]
},
{
"requires": "$hide_skin",
"$dialog_size": [ 230, 235 ],
"$dialog_max_size": [ 230, "100% - 4px" ]
}
]
},
// -----------------------------------------------
//
// screen
//
// -----------------------------------------------
"profile_card_screen@common.base_screen": {
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
}
],
"$screen_content": "profile_card.profile_card_screen_content"
},
"profile_card_screen_content": {
"type": "panel",
"controls": [
{ "main_panel@profile_card.main_panel": { "layer": 1 } }
]
}
}