mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-11-23 12:26:14 +00:00
474 lines
15 KiB
JSON
474 lines
15 KiB
JSON
{
|
|
"namespace": "realms_invite_link_settings",
|
|
|
|
"generic_section_wrapper": {
|
|
"type": "panel",
|
|
"anchor_from": "top_left",
|
|
"anchor_to": "top_left",
|
|
"offset": [ 2, 0 ],
|
|
"size": [ "100% - 4px", "100%c" ],
|
|
"$section_button_name|default": "name of selection toggle button",
|
|
"$section_content_name|default": "name of class defining the content",
|
|
"controls": [
|
|
{ "generic_section@realms_settings.generic_section": {} }
|
|
]
|
|
},
|
|
|
|
"link_banner": {
|
|
"type": "image",
|
|
"texture": "textures/ui/Banners",
|
|
"size": [ "100%", "default" ]
|
|
},
|
|
|
|
"clipboard_icon": {
|
|
"type": "image",
|
|
"texture": "textures/ui/copy",
|
|
"size": [ 12, 12 ]
|
|
},
|
|
|
|
"description_wrap": {
|
|
"type": "panel",
|
|
"size": [ "100%", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"description@realms_settings.label_text": {
|
|
"text": "$description_text",
|
|
"size": [ "100%", "default" ],
|
|
"color": "$light_button_secondary_default_text_color"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// General Content
|
|
|
|
"invite_link_url@realms_settings.label_text": {
|
|
"text": "#realm_invite_link_url",
|
|
"tts_override_control_value": "#realm_invite_link_url_TTS",
|
|
"color": "$body_text_color",
|
|
"size": [ "100%", "100%" ],
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#realm_invite_link_url"
|
|
},
|
|
{
|
|
"binding_name": "#realm_invite_link_url_TTS"
|
|
}
|
|
]
|
|
},
|
|
|
|
"link_panel@realms_invite_link_settings.link_banner": {
|
|
"size": [ "100%", 26 ],
|
|
"controls": [
|
|
{
|
|
"invite_link_url_wrapper@common.tts_label_focus_wrapper": {
|
|
"size": [ "100% - 26px", 10 ],
|
|
"offset": [ 4, 0 ],
|
|
"anchor_from": "left_middle",
|
|
"anchor_to": "left_middle",
|
|
"$tts_label_panel": "realms_invite_link_settings.invite_link_url"
|
|
}
|
|
},
|
|
{
|
|
"link_copy_container": {
|
|
"type": "panel",
|
|
"size": [ "26px", 26 ],
|
|
"anchor_to": "right_middle",
|
|
"anchor_from": "right_middle",
|
|
"controls": [
|
|
{
|
|
"link_copy@common_buttons.transparent_content_button": {
|
|
"ignored": "(not $supports_clipboard_set)",
|
|
"$pressed_button_name": "button.copy_link",
|
|
"$button_tts_header": "realmsSettingsScreen.inviteLinkCopyTTS",
|
|
"$button_content": "realms_invite_link_settings.clipboard_icon",
|
|
"size": [ 20, 20 ],
|
|
"anchor_to": "center",
|
|
"anchor_from": "center",
|
|
"$default_button_alpha": 0.3,
|
|
"$default_hover_alpha": 0.45,
|
|
"$default_pressed_alpha": 0.6,
|
|
"$light_glyph_default_color": [ 1, 1, 1 ],
|
|
"$light_glyph_hover_color": [ 1.19, 1.14, 1.05 ],
|
|
"$light_glyph_pressed_color": [ 0.8, 0.84, 0.93 ],
|
|
"$button_pressed_offset": [ 0, 0 ],
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_select",
|
|
"to_button_id": "button.realms_copy_invite_link",
|
|
"mapping_type": "pressed"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_ok",
|
|
"to_button_id": "button.realms_copy_invite_link",
|
|
"mapping_type": "focused"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#copy_share_enabled",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"general_content": {
|
|
"type": "stack_panel",
|
|
"size": [ "100% - 8px", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"spacing_gap_0": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"invite_link_title@realms_settings.label_text": {
|
|
"text": "#dialog_title",
|
|
"size": [ "100%", 12 ],
|
|
"color": "$body_text_color",
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#dialog_title"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"invite_link_description@realms_invite_link_settings.description_wrap": {
|
|
"$description_text": "realmsSettingsScreen.inviteLinkDescription"
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_1": {
|
|
"type": "panel",
|
|
"size": [ "100%", 2 ]
|
|
}
|
|
},
|
|
{ "link_panel@realms_invite_link_settings.link_panel": {} },
|
|
{
|
|
"spacing_gap_2": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"activate_link_toggle@settings_common.option_toggle": {
|
|
"$tts_section_header": "",
|
|
"$option_label": "realmsSettingsScreen.inviteLinkActivate",
|
|
"$toggle_tts_header": "realmsSettingsScreen.inviteLinkActivateTTS",
|
|
"$option_binding_name": "#activate_link",
|
|
"$option_enabled_binding_name": "#activate_link_enabled",
|
|
"$toggle_name": "activate_link_toggle",
|
|
"$focus_override_right": "FOCUS_OVERRIDE_STOP",
|
|
"$toggle_binding_condition": "always_when_visible"
|
|
}
|
|
},
|
|
{
|
|
"activate_link_description@realms_invite_link_settings.description_wrap": {
|
|
"$description_text": "realmsSettingsScreen.inviteLinkActivateDescription"
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_3": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"infinite_link_toggle@settings_common.option_toggle": {
|
|
"$tts_section_header": "",
|
|
"$option_label": "realmsSettingsScreen.inviteLinkInfiniteToggle",
|
|
"$option_binding_name": "#infinite_link",
|
|
"$option_enabled_binding_name": "#infinite_link_enabled",
|
|
"$toggle_name": "infinite_link_toggle",
|
|
"$focus_override_right": "FOCUS_OVERRIDE_STOP",
|
|
"$toggle_binding_condition": "always_when_visible"
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_4": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"share_link_title@realms_settings.label_text": {
|
|
"text": "realmsSettingsScreen.inviteLinkShare",
|
|
"size": [ "100%", 12 ],
|
|
"color": "$body_text_color"
|
|
}
|
|
},
|
|
{
|
|
"share_link_description@realms_invite_link_settings.description_wrap": {
|
|
"$description_text": "realmsSettingsScreen.inviteLinkShareDescription"
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_5": {
|
|
"type": "panel",
|
|
"size": [ "100%", 2 ]
|
|
}
|
|
},
|
|
{
|
|
"share_link_button@settings_common.action_button": {
|
|
"$button_text": "realmsSettingsScreen.inviteLinkShareButton",
|
|
"$button_tts_name": "realmsSettingsScreen.inviteLinkShareButtonTTS",
|
|
"$pressed_button_name": "realms_share_invite_link_button",
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#copy_share_enabled",
|
|
"binding_name_override": "#enabled"
|
|
}
|
|
],
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_select",
|
|
"to_button_id": "button.realms_invite_share",
|
|
"mapping_type": "pressed"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_ok",
|
|
"to_button_id": "button.realms_invite_share",
|
|
"mapping_type": "focused"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_6": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"remove_link_title@realms_settings.label_text": {
|
|
"text": "realmsSettingsScreen.inviteLinkRemove",
|
|
"size": [ "100%", 12 ],
|
|
"color": "$body_text_color"
|
|
}
|
|
},
|
|
{
|
|
"remove_invite_link_button@settings_common.action_button": {
|
|
"$button_text": "realmsSettingsScreen.inviteLinkRemoveButton",
|
|
"$button_tts_name": "realmsSettingsScreen.inviteLinkRemoveButtonTTS",
|
|
"$pressed_button_name": "realms_remove_invite_link_button",
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_select",
|
|
"to_button_id": "button.realms_remove_invite_link",
|
|
"mapping_type": "pressed"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_ok",
|
|
"to_button_id": "button.realms_remove_invite_link",
|
|
"mapping_type": "focused"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"invite_link_expiration@realms_settings.label_text": {
|
|
"text": "#invite_link_expiration_time",
|
|
"tts_override_control_value": "#invite_link_expiration_time_TTS",
|
|
"color": "$body_text_color",
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#invite_link_expiration_time"
|
|
},
|
|
{
|
|
"binding_name": "#invite_link_expiration_time_TTS"
|
|
}
|
|
]
|
|
},
|
|
|
|
"advanced_content": {
|
|
"type": "stack_panel",
|
|
"size": [ "100% - 8px", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"spacing_gap_0": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"expiry_title@realms_settings.label_text": {
|
|
"text": "realmsSettingsScreen.inviteLinkExpirationLabel",
|
|
"size": [ "100% - 8px", 10 ],
|
|
"color": "$body_text_color"
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_1": {
|
|
"type": "panel",
|
|
"size": [ "100%", 6 ]
|
|
}
|
|
},
|
|
{
|
|
"expiration_description@realms_invite_link_settings.description_wrap": {
|
|
"$description_text": "realmsSettingsScreen.inviteLinkExpirationDescription"
|
|
}
|
|
},
|
|
{
|
|
"spacing_gap_2": {
|
|
"type": "panel",
|
|
"size": [ "100%", 6 ]
|
|
}
|
|
},
|
|
{
|
|
"expiration_panel@realms_invite_link_settings.link_banner": {
|
|
"size": [ "100%", 21 ],
|
|
"controls": [
|
|
{
|
|
"invite_link_expiration_wrapper@common.tts_label_focus_wrapper": {
|
|
"size": [ "100% - 8px", 10 ],
|
|
"offset": [ 4, 0 ],
|
|
"anchor_from": "left_middle",
|
|
"anchor_to": "left_middle",
|
|
"$tts_label_panel": "realms_invite_link_settings.invite_link_expiration"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"expiration_dropdown@settings_common.option_dropdown": {
|
|
"$dropdown_content": "realms_invite_link_settings.expiration_dropdown_content",
|
|
"$dropdown_area": "content_area",
|
|
"$dropdown_name": "expiration_dropdown",
|
|
"$options_enabled_binding_name": "#expiration_duration_dropdown_enabled",
|
|
"$options_dropdown_toggle_label_binding": "#expiration_duration_dropdown_toggle_label",
|
|
"$dropdown_scroll_content_size": [ "100%", "424%" ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"expiration_dropdown_content@settings_common.option_radio_dropdown_group": {
|
|
"$radio_buttons": [
|
|
{
|
|
"never@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_never",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.never"
|
|
}
|
|
},
|
|
{
|
|
"halfHour@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_halfHour",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.halfHour"
|
|
}
|
|
},
|
|
{
|
|
"hour@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_hour",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.hour"
|
|
}
|
|
},
|
|
{
|
|
"quarterDay@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_quarterDay",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.quarterDay"
|
|
}
|
|
},
|
|
{
|
|
"halfDay@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_halfDay",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.halfDay"
|
|
}
|
|
},
|
|
{
|
|
"day@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_day",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.day"
|
|
}
|
|
},
|
|
{
|
|
"week@settings_common.radio_with_label": {
|
|
"$toggle_state_binding_name": "#expiration_duration_radio_week",
|
|
"$radio_label_text": "realmsSettingsScreen.expiration.week"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Left side
|
|
"selector_panel": {
|
|
"type": "stack_panel",
|
|
"size": [ "100%", "100%c + 4px" ],
|
|
"$default_selector_toggle_index": 1,
|
|
"$general_toggle_index|default": 1,
|
|
"$advanced_toggle_index|default": 2,
|
|
"controls": [
|
|
{
|
|
"spacing_gap_0": {
|
|
"type": "panel",
|
|
"size": [ "100%", 8 ]
|
|
}
|
|
},
|
|
{
|
|
"general_button@settings_common.section_toggle_base": {
|
|
"$toggle_view_binding_name": "general_button_toggle",
|
|
"$toggle_group_forced_index": "$general_toggle_index",
|
|
"$glyph_texture": "textures/ui/world_glyph",
|
|
"$glyph_color_texture": "textures/ui/world_glyph_color",
|
|
"$glyph_size": [ 16, 17 ],
|
|
"layer": 1,
|
|
"$button_text": "realmsSettingsScreen.inviteLinkSettingsGeneral",
|
|
"$toggle_property_bag": {
|
|
"#panel_title": "realmsSettingsScreen.inviteLinkSettingsGeneral"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"advanced_button@settings_common.section_toggle_base": {
|
|
"$toggle_view_binding_name": "advanced_button_toggle",
|
|
"$toggle_group_forced_index": "$advanced_toggle_index",
|
|
"$glyph_texture": "textures/ui/subscription_glyph",
|
|
"$glyph_color_texture": "textures/ui/subscription_glyph_color",
|
|
"$glyph_size": [ 15, 13 ],
|
|
"layer": 2,
|
|
"$button_text": "realmsSettingsScreen.inviteLinkSettingsAdvanced",
|
|
"$toggle_property_bag": {
|
|
"#panel_title": "realmsSettingsScreen.inviteLinkSettingsAdvanced"
|
|
},
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#realm_invite_link_active",
|
|
"binding_name_override": "#enabled"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Right side
|
|
"section_content_panels": {
|
|
"type": "panel",
|
|
"size": [ "100%", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"general_section@realms_invite_link_settings.generic_section_wrapper": {
|
|
"$section_button_name|default": "general_button_toggle",
|
|
"$section_content_name|default": "realms_invite_link_settings.general_content"
|
|
}
|
|
},
|
|
{
|
|
"advanced_section@realms_invite_link_settings.generic_section_wrapper": {
|
|
"$section_button_name|default": "advanced_button_toggle",
|
|
"$section_content_name|default": "realms_invite_link_settings.advanced_content"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|