1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-23 14:46:14 +00:00
bedrock-samples/resource_pack/ui/settings_sections/settings_common.json
Mike Ammerlaan 1c48a87a35 v1.21.20.3
2024-08-13 09:36:05 -07:00

1779 lines
57 KiB
JSON

/********************************************************
+* (c) Mojang. All rights reserved *
+* (c) Microsoft. All rights reserved. *
+*********************************************************/
{
"namespace": "settings_common",
"arrow_image": {
"$alpha|default": 1.0,
"type": "image",
"layer": 1,
"texture": "textures/ui/arrowRight",
"size": [ 8, 8 ],
"alpha": "$alpha"
},
"subsection_title": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%", "100%c + 10px" ],
"$text|default": "",
"controls": [
{
"spacer_0": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"sizer_0": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"title": {
"type": "label",
"color": "$main_header_text_color",
"text_alignment": "center",
"anchor_from": "center",
"anchor_to": "center",
"layer": 3,
"text": "$text"
}
}
]
}
},
{
"spacer_1": {
"type": "panel",
"size": [ "100%", 2 ]
}
},
{
"sizer_1": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"section_divider": {
"type": "image",
"size": [ "100% - 4px", 1 ],
"anchor_from": "center",
"anchor_to": "center",
"layer": 3,
"texture": "textures/ui/list_item_divider_line_light"
}
}
]
}
}
]
},
"action_button@common_buttons.light_text_button": {
"$pressed_button_name|default": "unset_button_name",
"$button_text|default": "unset $button_text",
"size": [ "100%", 30 ],
"anchor_from": "center",
"anchor_to": "center"
},
"action_button_dark_text@common_buttons.dark_text_button": {
"$pressed_button_name|default": "unset_button_name",
"$button_text|default": "unset $button_text",
"size": [ "100%", 30 ],
"anchor_from": "center",
"anchor_to": "center"
},
"link_button@common_buttons.hyperlink_button": {
"$button_text|default": "unset $button_text",
"size": [ "100%", 30 ],
"$button_size_override": [ "100%", "100% + 1px" ],
"anchor_from": "center",
"anchor_to": "center",
"property_bag": {
"#hyperlink": "unset #hyperlink in property_bag"
}
},
"option_group_label": {
"type": "panel",
"size": [ "100%", "100%c + 9px" ],
"$text|default": "unset $text",
"$text_bindings|default": [],
"$font_type|default": "default",
"$font_scale_factor|default": 1,
"controls": [
{
"text": {
"type": "label",
"color": "$main_header_text_color",
"text": "$text",
"anchor_from": "top_left",
"anchor_to": "top_left",
"max_size": [ "100%", "default" ],
"offset": [ 0, 4 ],
"locked_alpha": 0.5,
"bindings": "$text_bindings",
"font_type": "$font_type",
"font_scale_factor": "$font_scale_factor"
}
}
]
},
"option_generic": {
"type": "panel",
"$option_generic_panel_size|default": [ "100%", "100%c" ],
"size": "$option_generic_panel_size",
"$enabled|default": true,
"$option_enabled_binding_name|default": "",
"controls": [
{ "option_generic_core@settings_common.option_generic_core": {} }
]
},
"white_label": {
"type": "label",
"color": "$main_header_text_color",
"text": "$text"
},
// option_generic and option_generic_core are separated so that $enabled and
// $option_enabled_binding_name are guaranteed to be defined - otherwise, the
// variables section now in option_generic_core chokes.
"option_generic_core": {
"$allow_data_binding|default": true,
"$option_label|default": "",
"$show_option_label|default": true,
"$label_bindings|default": [],
"$one_line_layout|default": false,
"$has_option_description|default": false,
"$option_description|default": "",
"$option_enabled_binding_type|default": "global",
"$option_label_alignment|default": "left",
"$label_offset|default": [ 0, 0 ],
"type": "stack_panel",
"size": [ "100%", "100%c" ],
"enabled": "$enabled",
"variables": [
{
"requires": "(not $enabled or not $option_enabled_binding_name)",
"$option_enabled_binding_type": "none",
"$option_enabled_binding_name": "#not_data_bound"
}
],
"bindings": [
{
"binding_type": "$option_enabled_binding_type",
"binding_name": "$option_enabled_binding_name",
"binding_name_override": "#enabled"
}
],
"controls": [
{
"two_line_layout": {
"ignored": "($one_line_layout)",
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%", "100%c" ],
"controls": [
{
"option_label_panel": {
"type": "panel",
"size": [ "100%", "100%c" ],
"controls": [
{
"option_label": {
"type": "label",
"text_alignment": "$option_label_alignment",
"color": "$main_header_text_color",
"size": [ "100%", "default" ],
"offset": "$label_offset",
"layer": 1,
"text": "$option_label",
"visible": "$show_option_label",
"bindings": "$label_bindings",
"locked_alpha": 0.5
}
}
]
}
},
{
"spacer": {
"type": "panel",
"visible": "$show_option_label",
"size": [ 0, 1 ]
}
},
{
"option_descriptive_text_0": {
"ignored": "(not $has_option_description)",
"type": "label",
"text_alignment": "$option_label_alignment",
"size": [ "90%", "default" ],
"min_size": [ 0, 0 ],
"color": "$option_description_text_color",
"text": "$option_description",
"visible": "$show_option_label",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"locked_alpha": 0.5
}
},
{
"spacer2": {
"type": "panel",
"visible": "$show_option_label",
"size": [ 0, 1 ]
}
},
{
"$control_name@$control_name": {
"anchor_from": "top_left",
"anchor_to": "top_left"
}
}
]
}
},
{
"one_line_layout": {
"ignored": "(not $one_line_layout)",
"type": "panel",
// Since the label and control are on the same line in this layout,
// the height of the overall control should *not* be the sum of the
// heights of the two, which is what a height of "100%c" alone would
// mean, regardless of how the label and control are positioned
// relative to each other. Instead, the height should be the max of
// the two heights. Right now, the only control using this layout is
// the toggle, meaning that height is either 16px (the height of the
// toggle itself) or 100%c-16px (the height of the label, which varies
// due to line wrapping, and can only be obtained by subtracting the
// known height of the toggle, 16px, from the sum of the heights of
// the toggle and label, 100%c.
// Add 2px for spacing between label and description).
// If this layout is used for any other controls, then $line_size and
// $min_line_size will need to be changed accordingly, just like
// $label_size and $label_offset.
"$line_size|default": [ "100%", "100%c - 16px + 2px" ],
"$line_min_size|default": [ "100%", "16px" ],
"size": "$line_size",
"min_size": "$line_min_size",
"$label_size|default": [ "100% - 34px", "default" ],
"$label_offset|default": [ 34, 3 ],
"controls": [
{
"$control_name@$control_name": {
"anchor_from": "top_left",
"anchor_to": "top_left"
}
},
{
"option_label": {
"type": "label",
"color": "$main_header_text_color",
"text_alignment": "$option_label_alignment",
"layer": 1,
"size": "$label_size",
"offset": "$label_offset",
"anchor_from": "top_left",
"anchor_to": "top_left",
"text": "$option_label",
"visible": "$show_option_label",
"bindings": "$label_bindings",
"locked_alpha": 0.5
}
},
{
"option_descriptive_text": {
"ignored": "(not $has_option_description)",
"type": "label",
"text_alignment": "$option_label_alignment",
"size": "$label_size",
"offset": "$label_offset",
"min_size": [ 0, 0 ],
"color": "$option_description_text_color",
"text": "$option_description",
"visible": "$show_option_label",
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"locked_alpha": 0.5
}
}
]
}
},
{
"spacer": {
"type": "panel",
"size": [ 0, 4 ]
}
}
]
},
"option_text_edit_control@common.text_edit_box": {
"$option_text_edit_control_size|default": [ "100%", "30px" ],
"size": "$option_text_edit_control_size",
"max_length": "$max_text_edit_length",
"$text_edit_box_content_binding_name": "$option_binding_name",
"$text_edit_box_binding_collection_name": "$option_binding_name",
"$text_edit_box_binding_type": "global",
"$text_box_enabled_binding_name": "$option_enabled_binding_name",
"enabled": "$enabled",
"$place_holder_text": "$option_place_holder_text",
"$text_box_tts_header": "$option_label",
"$tts_override_control_value|default": " ",
"tts_override_control_value": "$tts_override_control_value",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$text_box_enabled_binding_name": "#not_data_bound",
"$text_edit_box_enabled_binding_type": "none"
}
]
},
"option_text_edit_control_with_button": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "30px" ],
"controls": [
{
"text_box@common.text_edit_box": {
"size": [ "85%", "100%" ],
"max_length": "$max_text_edit_length",
"$text_edit_box_content_binding_name": "$option_binding_name",
"$text_edit_box_binding_collection_name": "$option_binding_name",
"$text_edit_box_binding_type": "global",
"$text_box_enabled_binding_name": "$option_enabled_binding_name",
"enabled": "$enabled",
"$place_holder_text": "$option_place_holder_text",
"$text_box_tts_header": "$option_label",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$text_box_enabled_binding_name": "#not_data_bound",
"$text_edit_box_enabled_binding_type": "none"
}
]
}
},
{
"button@common_buttons.light_glyph_button": {
"$button_content": "settings_common.arrow_image",
"size": [ "fill", "100%" ]
}
}
]
},
"option_text_edit_control_with_text_button": {
"type": "stack_panel",
"orientation": "horizontal",
"$option_text_edit_control_with_button_size|default": [ "100%", "30px" ],
"size": "$option_text_edit_control_with_button_size",
"controls": [
{
"text_box@common.text_edit_box": {
"$option_text_edit_control_size|default": [ "85%", "100%" ],
"size": "$option_text_edit_control_size",
"max_length": "$max_text_edit_length",
"$text_edit_box_content_binding_name": "$option_binding_name",
"$text_edit_box_binding_collection_name": "$option_binding_name",
"$text_edit_box_binding_type": "global",
"$text_box_enabled_binding_name": "$option_enabled_binding_name",
"enabled": "$enabled",
"$place_holder_text": "$option_place_holder_text",
"$text_box_tts_header": "$option_label",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$text_box_enabled_binding_name": "#not_data_bound",
"$text_edit_box_enabled_binding_type": "none"
}
]
}
},
{
"button@common_buttons.light_text_button": {
"$pressed_button_name|default": "unset_button_name",
"$button_text|default": "unset $button_text",
"$option_button_control_size|default": [ "fill", "100%" ],
"size": "$option_button_control_size"
}
}
]
},
"option_toggle_state_template": {
"type": "image",
"size": [ 30, 16 ],
"anchor_from": "top_left",
"anchor_to": "top_left"
},
"option_toggle_on@settings_common.option_toggle_state_template": {
"texture": "textures/ui/toggle_on"
},
"option_toggle_off@settings_common.option_toggle_state_template": {
"texture": "textures/ui/toggle_off"
},
"option_toggle_on_hover@settings_common.option_toggle_state_template": {
"texture": "textures/ui/toggle_on_hover"
},
"option_toggle_off_hover@settings_common.option_toggle_state_template": {
"texture": "textures/ui/toggle_off_hover"
},
"option_toggle_on_locked@settings_common.option_toggle_on": {
"alpha": 0.5
},
"option_toggle_off_locked@settings_common.option_toggle_off": {
"alpha": 0.5
},
"option_toggle_control@common.toggle": {
"layer": 2,
"$toggle_state_binding_name|default": "$option_binding_name",
"$toggle_enabled_binding_name|default": "$option_enabled_binding_name",
"$toggle_enabled_binding_type|default": "global",
"size": [ "100%", "100%c" ],
"$binding_type": "global",
"$binding_condition": "once",
"$unchecked_control": "settings_common.option_toggle_off",
"$checked_control": "settings_common.option_toggle_on",
"$unchecked_hover_control": "settings_common.option_toggle_off_hover",
"$checked_hover_control": "settings_common.option_toggle_on_hover",
"$unchecked_locked_control": "settings_common.option_toggle_off_locked",
"$unchecked_locked_hover_control": "settings_common.option_toggle_off_locked",
"$checked_locked_control": "settings_common.option_toggle_on_locked",
"$checked_locked_hover_control": "settings_common.option_toggle_on_locked",
"$enable_directional_toggling": false,
"enabled": "$enabled",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$toggle_enabled_binding_name": "#not_data_bound",
"$toggle_enabled_binding_type": "none"
}
]
},
"checkbox_visuals_unchecked@checkbox_visuals": {
"$checkbox_texture": "textures/ui/checkbox_space"
},
"checkbox_visuals_checked@checkbox_visuals": {
"$checkbox_texture": "textures/ui/checkbox_check",
"$selected": true
},
"checkbox_visuals_unchecked_locked@checkbox_visuals": {
"$checkbox_texture": "textures/ui/checkbox_spaceDisabled",
"$alpha": 0.5
},
"checkbox_visuals_checked_locked@checkbox_visuals": {
"$checkbox_texture": "textures/ui/checkbox_checkDisabled",
"$alpha": 0.5,
"$selected": true
},
"checkbox_visuals_unchecked_hover@checkbox_visuals": {
"$checkbox_texture": "textures/ui/checkbox_spaceHover",
"$hovered": true
},
"checkbox_visuals_checked_hover@checkbox_visuals": {
"$checkbox_texture": "textures/ui/checkbox_checkHover",
"$hovered": true
},
"checkbox_visuals": {
"type": "panel",
"$alpha|default": 1.0,
"$checkbox_label_bindings|default": [],
"$checkbox_label_color|default": "$main_header_text_color",
"$checkbox_label_font_type|default": "default",
"$no_label|default": false,
"$selected|default": false,
"$hovered|default": false,
"variables": [
{
"requires": "$selected",
"$highlight_image": "textures/ui/dropDownSelectBG"
},
{
"requires": "$hovered",
"$highlight_image": "textures/ui/dropDownHoverBG"
}
],
"controls": [
{
"checkbox_image": {
"type": "image",
"texture": "$checkbox_texture",
"alpha": "$alpha",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"size": [ 10, 10 ],
"offset": [ 5, 0 ],
"layer": 2
}
},
{
"checkbox_label": {
"ignored": "($no_label)",
"type": "label",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"text": "$checkbox_label_text",
"font_type": "$checkbox_label_font_type",
"color": "$checkbox_label_color",
"offset": [ 21, 0 ],
"size": [ "100% - 21px", "default" ],
"alpha": "$alpha",
"bindings": "$checkbox_label_bindings",
"layer": 2
}
},
{
"accessibility_selection_highlight": {
"type": "image",
"$selection_highlight_size|default": [ "100%-2px", "100%-2px" ],
"size": "$selection_highlight_size",
"$selection_highlight_offset|default": [ 0, 0 ],
"offset": "$selection_highlight_offset",
"ignored": "(not $selected and not $hovered)",
"$highlight_image|default": "",
"texture": "$highlight_image",
"tiled": true,
"layer": 1
}
}
]
},
"checkbox_with_highlight_and_label@common.toggle": {
// don't forget to implement "$toggle_name" and "$checkbox_label_text" when extending this control
"$unchecked_control|default": "settings_common.checkbox_visuals_unchecked",
"$checked_control|default": "settings_common.checkbox_visuals_checked",
"$unchecked_hover_control|default": "settings_common.checkbox_visuals_unchecked_hover",
"$checked_hover_control|default": "settings_common.checkbox_visuals_checked_hover",
"$unchecked_locked_control|default": "settings_common.checkbox_visuals_unchecked_locked",
"$unchecked_locked_hover_control|default": "settings_common.checkbox_visuals_unchecked_locked",
"$checked_locked_control|default": "settings_common.checkbox_visuals_checked_locked",
"$checked_locked_hover_control|default": "settings_common.checkbox_visuals_checked_locked"
},
"radio_visuals_unchecked@radio_visuals": {
"$radio_texture": "textures/ui/radio_off"
},
"radio_visuals_checked@radio_visuals": {
"$radio_texture": "textures/ui/radio_on",
"$selected": true
},
"radio_visuals_unchecked_locked@radio_visuals": {
"$radio_texture": "textures/ui/radio_off",
"$alpha": 0.5
},
"radio_visuals_checked_locked@radio_visuals": {
"$radio_texture": "textures/ui/radio_on",
"$alpha": 0.5,
"$selected": true
},
"radio_visuals_unchecked_hover@radio_visuals": {
"$radio_texture": "textures/ui/radio_off_hover",
"$hovered": true
},
"radio_visuals_checked_hover@radio_visuals": {
"$radio_texture": "textures/ui/radio_on_hover",
"$hovered": true
},
"radio_visuals": {
"type": "panel",
"size": [ "100%", 16 ],
"$alpha|default": 1.0,
"$radio_label_bindings|default": [],
"$radio_label_color|default": "$main_header_text_color",
"$radio_label_font_type|default": "default",
"$no_label|default": false,
"$selected|default": false,
"$hovered|default": false,
"variables": [
{
"requires": "$selected",
"$highlight_image": "textures/ui/dropDownSelectBG"
},
{
"requires": "$hovered",
"$highlight_image": "textures/ui/dropDownHoverBG"
}
],
"controls": [
{
"radio_image": {
"type": "image",
"texture": "$radio_texture",
"alpha": "$alpha",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"size": [ 10, 10 ],
"layer": 2
}
},
{
"radio_label": {
"ignored": "($no_label)",
"type": "label",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"text": "$radio_label_text",
"font_type": "$radio_label_font_type",
"color": "$radio_label_color",
"offset": [ 16, 0.5 ],
"size": [ "100% - 16px", "default" ],
"alpha": "$alpha",
"bindings": "$radio_label_bindings",
"layer": 2
}
},
{
"accessibility_selection_highlight": {
"type": "image",
"$selection_highlight_size|default": [ "100% + 4px", "100% + 2px" ],
"size": "$selection_highlight_size",
"$selection_highlight_offset|default": [ 0, 0 ],
"offset": "$selection_highlight_offset",
"ignored": "(not $selected and not $hovered)",
"$highlight_image|default": "",
"texture": "$highlight_image",
"tiled": true,
"layer": 1
}
}
]
},
"radio_with_label_core@common.radio_toggle": {
"$unchecked_control|default": "settings_common.radio_visuals_unchecked",
"$checked_control|default": "settings_common.radio_visuals_checked",
"$unchecked_hover_control|default": "settings_common.radio_visuals_unchecked_hover",
"$checked_hover_control|default": "settings_common.radio_visuals_checked_hover",
"$unchecked_locked_control|default": "settings_common.radio_visuals_unchecked_locked",
"$unchecked_locked_hover_control|default": "settings_common.radio_visuals_unchecked_locked",
"$checked_locked_control|default": "settings_common.radio_visuals_checked_locked",
"$checked_locked_hover_control|default": "settings_common.radio_visuals_checked_locked",
"$radio_toggle_group": true,
"size": [ "100%", "100%c" ],
"$toggle_name|default": "$toggle_state_binding_name",
"$toggle_enabled_binding_name": "$option_enabled_binding_name",
"enabled": "$enabled",
"$toggle_enabled_binding_type": "global",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$toggle_enabled_binding_name": "#not_data_bound",
"$toggle_enabled_binding_type": "none"
}
]
},
"option_radio_group_control": {
"type": "stack_panel",
"size": [ "100%", "100%c" ],
"controls": "$radio_buttons",
/* Here's an example of how $radio_buttons should be defined:
"$radio_buttons": [
{
"@settings_common.radio_with_label": {
"$toggle_state_binding_name": "#game_mode_radio_survival",
"$radio_label_text": "realmsSettingsScreen.survivalRadioButton",
}
},
{
"@settings_common.radio_with_label": {
"$toggle_state_binding_name": "#game_mode_radio_creative",
"$radio_label_text": "realmsSettingsScreen.creativeRadioButton",
}
}
]
*/
"$radio_factory|default": { "name": "empty" },
"$radio_collection_name|default": "",
"$radio_bindings|default": [],
"factory": "$radio_factory",
"collection_name": "$radio_collection_name",
"bindings": "$radio_bindings"
},
"radio_with_label": {
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "17px" ],
"offset": [ 3, 0 ],
"$enabled|default": true,
"controls": [
{ "radio_with_label_core@settings_common.radio_with_label_core": {} }
]
},
"radio_with_label_and_content_unchecked@settings_common.radio_with_label_and_content": {
"$radio_texture": "textures/ui/radio_off"
},
"radio_with_label_and_content_checked@settings_common.radio_with_label_and_content": {
"$radio_background_color": "$radio_background_checked_color",
"$radio_texture": "textures/ui/radio_on"
},
"radio_with_label_and_content_unchecked_locked@settings_common.radio_with_label_and_content": {
"$radio_texture": "textures/ui/radio_off",
"$alpha": 0.5
},
"radio_with_label_and_content_checked_locked@settings_common.radio_with_label_and_content": {
"$radio_background_color": "$radio_background_checked_color",
"$radio_texture": "textures/ui/radio_on",
"$alpha": 0.5
},
"radio_with_label_and_content_unchecked_hover@settings_common.radio_with_label_and_content": {
"$radio_background_color": "$radio_background_hover_color",
"$radio_texture": "textures/ui/radio_off_hover"
},
"radio_with_label_and_content_checked_hover@settings_common.radio_with_label_and_content": {
"$radio_background_color": "$radio_background_hover_color",
"$radio_texture": "textures/ui/radio_on_hover"
},
"radio_with_label_and_content_stack_item": {
"type": "panel",
"$radio_stack_item_element_size|default": [ "100%c", 19 ],
"size": "$radio_stack_item_element_size"
},
"radio_with_label_and_content": {
"type": "panel",
"size": [ "100%", "100%cm" ],
"$radio_background_color|default": "$radio_background_unchecked_color",
"controls": [
{
"radio_background": {
"type": "image",
"texture": "textures/ui/White",
"keep_ratio": false,
"size": [ "100% - 4px", "100%sm" ],
"color": "$radio_background_color",
"layer": 1
}
},
{
"radio_item_with_description_stack": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%", "100%c + 4px" ],
"layer": 2,
"$no_description|default": true,
"controls": [
{
"radio_icon_and_label@settings_common.radio_item_with_label_and_content_stack": {}
},
{
"radio_description@settings_common.radio_description_panel": {}
}
]
}
}
]
},
"radio_item_with_label_and_content_stack": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [ "100%", "100%cm" ],
"layer": 1,
"$alpha|default": 1.0,
"$radio_label_bindings|default": [],
"$radio_label_color|default": "$main_header_text_color",
"$radio_label_font_type|default": "default",
"$no_radio_content|default": true,
"$no_label|default": false,
"controls": [
{
"initial_padding@common.empty_panel": {
"size": [ 5, "100%sm" ]
}
},
{
"radio_image_panel@settings_common.radio_with_label_and_content_stack_item": {
"controls": [
{
"image": {
"type": "image",
"texture": "$radio_texture",
"alpha": "$alpha",
"size": [ 10, 10 ]
}
}
]
}
},
{
"radio_to_content_padding@common.empty_panel": {
"size": [ 5, "100%sm" ]
}
},
{
"radio_content_panel@settings_common.radio_with_label_and_content_stack_item": {
"ignored": "$no_radio_content",
"controls": [
{ "radio_image@$radio_content_control": {} }
]
}
},
{
"content_to_label_padding@common.empty_panel": {
"ignored": "$no_radio_content",
"size": [ 5, "100%sm" ]
}
},
{
"radio_label_panel@settings_common.radio_with_label_and_content_stack_item": {
"controls": [
{
"radio_label": {
"ignored": "($no_label)",
"type": "label",
"shadow": true,
"text": "$radio_label_text",
"font_type": "$radio_label_font_type",
"color": "$radio_label_color",
"size": [ "default", "default" ],
"alpha": "$alpha",
"bindings": "$radio_label_bindings"
}
}
]
}
}
]
},
"radio_description_panel": {
"ignored": "($no_description)",
"type": "panel",
"size": [ "100%", "100%c" ],
"layer": 1,
"$description_font_type": "smooth",
"$description_font_scale_factor": 1.333,
"controls": [
{
"description@settings_common.radio_description": {}
}
]
},
"radio_description": {
"type": "label",
"color": "$main_header_text_color",
"size": [ "100% - 10px", "default" ],
"text": "$radio_label_desc",
"font_type": "$description_font_type",
"font_scale_factor": "$description_font_scale_factor",
"shadow": false,
"offset": [ 4, 2 ]
},
"radio_item_with_label_and_content": {
"$radio_background_unchecked_color": "$dropdown_radio_background_unchecked_color",
"$radio_background_checked_color": "$dropdown_radio_background_checked_color",
"$radio_background_hover_color": "$dropdown_radio_background_hover_color",
"$checked_control": "settings_common.radio_with_label_and_content_checked",
"$unchecked_control": "settings_common.radio_with_label_and_content_unchecked",
"$checked_hover_control": "settings_common.radio_with_label_and_content_checked_hover",
"$unchecked_hover_control": "settings_common.radio_with_label_and_content_unchecked_hover",
"$checked_locked_control": "settings_common.radio_with_label_and_content_checked_locked",
"$unchecked_locked_control": "settings_common.radio_with_label_and_content_unchecked_locked",
"$checked_locked_hover_control": "settings_common.radio_with_label_and_content_checked_locked",
"$unchecked_locked_hover_control": "settings_common.radio_with_label_and_content_unchecked_locked",
"type": "panel",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "100%cm" ],
"controls": [
{ "radio_with_label_core@settings_common.radio_with_label_core": {} }
]
},
"option_slider_control": {
"type": "panel",
"size": [ "100% - 2px", 16 ],
"controls": [
{
"slider@common.slider": {
"size": [ "100%-8px", 10 ],
"$slider_box_size": [ 10, 16 ],
"offset": [ 1, 0 ],
"$option_label|default": "",
"$slider_tts_header": "$option_label",
"$slider_tts_header_binding_type": "global",
"enabled": "$enabled",
"$slider_enabled_binding_name": "$option_enabled_binding_name",
"$slider_enabled_binding_type": "global",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$slider_enabled_binding_name": "#not_data_bound",
"$slider_enabled_binding_type": "none"
}
]
}
}
]
},
"default_options_dropdown_toggle_button_state_content": {
"type": "stack_panel",
// new_button_state has a layer of 2
"layer": 3,
"orientation": "horizontal",
"$options_dropdown_toggle_button_state_content|default": [ "100%", "100% - 8px" ],
"size": "$options_dropdown_toggle_button_state_content",
"$options_dropdown_toggle_prelabel_content|default": "common.empty_panel",
"$options_dropdown_toggle_left_padding|default": [ 8, "100%" ],
"$options_dropdown_toggle_right_padding|default": [ 8, "100%" ],
"controls": [
{
"left_padding@common.empty_panel": {
"size": "$options_dropdown_toggle_left_padding"
}
},
{
"option_content@$options_dropdown_toggle_prelabel_content": {
"$options_dropdown_toggle_prelabel_content_size|default": [ 0, "100%" ],
"size": "$options_dropdown_toggle_prelabel_content_size"
}
},
{
"option_content_padding@common.empty_panel": {
"$options_dropdown_toggle_prelabel_content_padding|default": [ 0, "100%" ],
"size": "$options_dropdown_toggle_prelabel_content_padding"
}
},
{
"label_panel": {
"type": "panel",
"layer": 1,
"size": [ "fill", "100%" ],
"controls": [
{
"label@common.new_button_label": {
"layer": 1,
"$options_dropdown_label_color_binding_type|default": "none",
"$options_dropdown_label_color_binding|default": "",
"$options_dropdown_toggle_label_font_type|default": "default",
"$options_dropdown_toggle_label_font_scale|default": 1.0,
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"size": [ "100%", "default" ],
"max_size": [ "100%", "100%" ],
"text": "$options_dropdown_toggle_label_binding",
"font_type": "$options_dropdown_toggle_label_font_type",
"font_scale_factor": "$options_dropdown_toggle_label_font_scale",
"$options_dropdown_toggle_label_shadow|default": false,
"shadow": "$options_dropdown_toggle_label_shadow",
"alpha": "$content_alpha",
"$options_dropdown_toggle_label_binding_type|default": "global",
"$options_dropdown_toggle_label_binding_collection_name|default": "",
"$options_dropdown_label_bindings|default": [
{
"binding_name": "$options_dropdown_toggle_label_binding",
"binding_condition": "none",
"binding_type": "$options_dropdown_toggle_label_binding_type",
"binding_collection_name": "$options_dropdown_toggle_label_binding_collection_name"
},
{
"binding_name": "$options_dropdown_label_color_binding",
"binding_type": "$options_dropdown_label_color_binding_type",
"binding_name_override": "#color"
}
],
"bindings": "$options_dropdown_label_bindings"
}
}
]
}
},
{
"arrow_panel": {
"type": "panel",
"layer": 1,
"size": [ "100%c", "100%" ],
"controls": [
{
"dropdown_chevron_image": {
"$alpha|default": 1.0,
"type": "image",
"layer": 1,
"texture": "$default_chevron",
"size": [ 8, 8 ],
"alpha": "$alpha"
}
}
]
}
},
{
"right_padding@common.empty_panel": {
"size": "$options_dropdown_toggle_right_padding"
}
}
]
},
"options_dropdown_toggle_control@common_toggles.light_template_toggle": {
"size": [ "100%", "100%" ],
"$button_type_panel|default": "settings_common.default_options_dropdown_toggle_button_state_content",
"$unchecked_hover_control": "common_toggles.toggle_unchecked_hover_with_chevron",
"$checked_hover_control": "common_toggles.toggle_checked_hover_with_chevron",
"enabled": "$enabled",
"$toggle_enabled_binding_name|default": "$option_enabled_binding_name",
"$toggle_enabled_binding_type|default": "global",
"$toggle_binding_type|default": "global",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$toggle_enabled_binding_name": "#not_data_bound",
"$toggle_enabled_binding_type": "none"
}
]
},
"options_dropdown_dark_toggle_control@common_toggles.dark_template_toggle": {
"size": [ "100%", "100%" ],
"$button_type_panel|default": "settings_common.default_options_dropdown_toggle_button_state_content",
"$unchecked_hover_control": "common_toggles.toggle_unchecked_hover_with_chevron",
"$checked_hover_control": "common_toggles.toggle_checked_hover_with_chevron",
"enabled": "$enabled",
"$toggle_enabled_binding_name|default": "$option_enabled_binding_name",
"$toggle_enabled_binding_type|default": "global",
"$toggle_binding_type|default": "global",
"variables": [
{
"requires": "(not $option_enabled_binding_name or not $enabled)",
"$toggle_enabled_binding_name": "#not_data_bound",
"$toggle_enabled_binding_type": "none"
}
]
},
"option_dropdown_control": {
"type": "panel",
"$option_dropdown_size|default": [ "100%", 30 ],
"size": "$option_dropdown_size",
"anchor_from": "center",
"anchor_to": "center",
"$dropdown_background_control|default": "common.dropdown_background",
"$option_dropdown_type|default": "common.dropdown",
"$option_label|default": "",
"layer": 2,
"controls": [
{
"dropdown@$option_dropdown_type": {
"$dropdown_toggle": "settings_common.options_dropdown_toggle_control",
"$dropdown_background": "$dropdown_background_control",
// you need to specify the content with "$dropdown_content"
"$dropdown_content|default": "unset_dropdown_content",
// you need to specify a unique name with "$dropdown_name"
"$dropdown_name|default": "unset $dropdown_name",
// you need to specify a the label with "$options_dropdown_toggle_label_binding"
"$options_dropdown_toggle_label_binding|default": "unset $options_dropdown_toggle_label_text",
"$locked_alpha": 0.5,
"$toggle_tts_header": "$option_label"
}
}
]
},
"option_dropdown_control_no_scroll@settings_common.option_dropdown_control": {
"$option_dropdown_type": "common.dropdown_no_scrollpanel"
},
"option_info_label_with_bulb": {
"type": "image",
"texture": "textures/ui/text_label_box",
"size": [ "100%", "100%c + 6px" ],
"$used_fontsize|default": "normal",
"$used_fonttype|default": "default",
"$second_info_panel_visible|default": false,
"$container_text_secondary_binding_name|default": "",
"controls": [
{
"stack_panel": {
"type": "stack_panel",
"size": [ "100%", "100%cm" ],
"orientation": "horizontal",
"controls": [
{
"padding1@common.empty_panel": {
"size": [ 2, 19 ]
}
},
{
"bulb_panel": {
"type": "stack_panel",
"orientation": "vertical",
"size": [ "100%c", "100%sm" ],
"controls": [
{
"padding1@common.empty_panel": {
"size": [ 0, "fill" ]
}
},
{
"bulb_image": {
"type": "image",
"size": [ 15, 19 ],
"bilinear": true,
"texture": "textures/ui/infobulb",
"layer": 1
}
},
{
"padding2@common.empty_panel": {
"size": [ 0, "fill" ]
}
}
]
}
},
{
"padding2@common.empty_panel": {
"size": [ 2, 0 ]
}
},
{
"label_panel": {
"type": "stack_panel",
"size": [ "fill", "100%c" ],
"orientation": "vertical",
"controls": [
{
"info_label1": {
"type": "label",
"color": "$main_header_text_color",
"size": [ "100% - 2px", "default" ],
"layer": 1,
"text": "$container_text_binding_name",
"font_size": "$used_fontsize",
"font_type": "$used_fonttype",
"bindings": [
{
"binding_name": "$container_text_binding_name"
}
]
}
},
{
"padding2@common.empty_panel": {
"size": [ 0, 8 ]
}
},
{
"info_label2": {
"type": "label",
"color": "$main_header_text_color",
"size": [ "100% - 2px", "default" ],
"layer": 1,
"text": "$container_text_secondary_binding_name",
"font_size": "$used_fontsize",
"font_type": "$used_fonttype",
"visible": "$second_info_panel_visible",
"bindings": [
{
"binding_name": "$container_text_secondary_binding_name"
}
]
}
}
]
}
},
{
"padding3@common.empty_panel": {
"size": [ 0, 8 ]
}
}
]
}
}
]
},
"option_info_label_with_image": {
"type": "image",
"texture": "textures/ui/text_label_box",
"size": [ "100%", "100%c + 6px" ],
"$used_fontsize|default": "normal",
"$used_fonttype|default": "default",
"controls": [
{
"control": {
"type": "label",
"color": "$main_header_text_color",
"size": [ "100% - 8px", "default" ],
"layer": 1,
"text": "$container_text_binding_name",
"font_size": "$used_fontsize",
"font_type": "$used_fonttype",
"bindings": [
{
"binding_name": "$container_text_binding_name"
}
]
}
}
]
},
"option_info_label_image@common.tts_label_focus_wrapper": {
"$tts_label_panel": "settings_common.option_info_label_with_image"
},
"option_toggle@settings_common.option_generic": {
"$control_name": "settings_common.option_toggle_control",
"$option_label|default": "",
"$toggle_tts_header": "$option_label",
"variables": [
{
"requires": "$desktop_screen",
"$one_line_layout": true
}
]
},
"option_radio_group@settings_common.option_generic": {
"$control_name": "settings_common.option_radio_group_control"
},
"option_radio_dropdown_group": {
"type": "panel",
"size": [ "100% - 4px", "100%c + 4px" ],
"offset": [ 2, 1 ],
"$toggle_tts_header": "",
"$toggle_tts_name": "accessibility.dropdown.listItem",
"$toggle_tts_toggle_on_text": "accessibility.state.selected",
"$toggle_tts_toggle_off_text": "accessibility.state.unselected",
"$toggle_tts_type_priority": 50,
"controls": [
{
"radio_control_group@settings_common.option_radio_group_control": {
"anchor_from": "top_left",
"anchor_to": "top_left"
}
}
]
},
"option_text_edit@settings_common.option_generic": {
"$option_place_holder_text|default": "",
"$max_text_edit_length|default": 30,
"$control_name": "settings_common.option_text_edit_control"
},
"option_text_edit_with_button@settings_common.option_generic": {
"$option_place_holder_text|default": "",
"$max_text_edit_length|default": 30,
"$control_name": "settings_common.option_text_edit_control_with_button"
},
"option_text_edit_with_text_button@settings_common.option_generic": {
"$option_place_holder_text|default": "",
"$max_text_edit_length|default": 30,
"$control_name": "settings_common.option_text_edit_control_with_text_button"
},
"option_slider@settings_common.option_generic": {
"$control_name": "settings_common.option_slider_control"
},
"option_dropdown@settings_common.option_generic": {
"$control_name": "settings_common.option_dropdown_control"
},
"option_dropdown_no_scroll@settings_common.option_generic": {
"$control_name": "settings_common.option_dropdown_control_no_scroll"
},
"option_custom_control@settings_common.option_generic": {
// user must set $control_name
},
"option_info_label@settings_common.option_generic": {
"$control_name": "settings_common.option_info_label_image"
},
"dynamic_dialog_screen@common.base_screen": {
"type": "screen",
"cache_screen": true,
"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"
}
],
"variables": [
{
"requires": "($is_realm_slot or $realm_no_world_edit)",
"$screen_background_control": "realms_slots.realms_background"
}
],
"$screen_content": "settings_common.settings_content",
"$header_safezone_control": "common_store.store_top_bar_filler",
"$header_bar_control": "common_store.store_top_bar",
"$is_full_screen_layout": true
},
"settings_content": {
"type": "panel",
"controls": [
// Adding fill background color for all settings.
{
"background": {
"$layer|default": -1,
"variables": [
{
"requires": "($is_realm_slot or $realm_no_world_edit)",
"$layer": -2
}
],
"type": "image",
"texture": "textures/ui/White",
"keep_ratio": false,
"size": [ "100%", "100%sm" ],
"color": [ 0.192, 0.196, 0.2 ], // First test: [0.239, 0.204, 0.204]
"offset": [ 0, 0 ],
"layer": "$layer",
"anchor_from": "top_left",
"anchor_to": "top_left"
}
},
{
"stack_panel": {
"type": "stack_panel",
"size": [ "100%", "100%" ],
"controls": [
{
"content_panel": {
"type": "panel",
"size": [ "100%", "fill" ],
"controls": [
{
"common_panel@common.fullscreen_header": {
"$dialog_background": "dialog_background_hollow_3"
}
},
{
"container": {
"type": "panel",
"size": [ "100%", "100% - 4px" ],
"controls": [
{ "$dialog_content@$dialog_content": {} }
]
}
}
]
}
}
]
}
},
{
"popup_dialog_factory": {
"type": "factory",
"control_ids": {
"purchase_failed": "@realms_create.popup_dialog__purchase_failed",
"purchase_in_progress": "@realms_create.popup_dialog__purchase_in_progress",
"backups_modal": "@realms_settings.popup_dialog__backups",
"sign_out_fail": "@general_section.sign_out_fail_popup",
"edu_onedrive_error": "@general_section.edu_cloud_onedrive_error_popup"
}
}
}
]
},
"toggle_button_control": {
"type": "panel",
"$glyph_offset|default": [ 5, 0 ],
"$glyph_anchor_from|default": "left_middle",
"$glyph_anchor_to|default": "left_middle",
"$button_label_offset|default": [ 34, 0 ],
"layer": 2,
"controls": [
{
"glyph": {
"type": "image",
"anchor_from": "$glyph_anchor_from",
"anchor_to": "$glyph_anchor_to",
"offset": "$glyph_offset",
"texture": "$glyph_texture",
"size": "$glyph_size",
"layer": 3,
"color": "$glyph_color",
"alpha": "$content_alpha",
"$glyph_bindings|default": [],
"bindings": "$glyph_bindings"
}
},
{
"glyph_color": {
"type": "image",
"anchor_from": "$glyph_anchor_from",
"anchor_to": "$glyph_anchor_to",
"offset": "$glyph_offset",
"texture": "$glyph_color_texture",
"size": "$glyph_size",
"layer": 4,
"alpha": "$content_alpha",
"$glyph_color_bindings|default": [],
"bindings": "$glyph_color_bindings"
}
},
{
"progress_loading_bars@progress.progress_loading_bars": {
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"color": "$glyph_color",
"offset": [ 5, 0 ],
"layer": 5,
"size": "$glyph_size",
"visible": false,
"$glyph_progress_bindings|default": [],
"bindings": "$glyph_progress_bindings"
}
},
{
"tab_button_text": {
"type": "label",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"size": [ "100% - 38px", "default" ],
"max_size": [ "100% - 38px", "100% - 4px" ],
"offset": "$button_label_offset",
"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",
"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",
"binding_name_override": "$button_text"
}
]
}
}
]
},
"section_toggle_base@common_toggles.light_ui_toggle": {
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", "30px" ],
"$button_size_override": [ "100%", "100% + 1px" ],
"$button_type_panel": "settings_common.toggle_button_control",
"$radio_toggle_group": true,
"$toggle_name": "navigation_tab",
"$toggle_group_default_selected": "$default_selector_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",
"$toggle_tts_toggle_on_text": "accessibility.state.selected",
"$toggle_tts_toggle_off_text": "accessibility.state.unselected",
"$toggle_tts_name": "accessibility.tab.tts.title"
},
// upper right title
"section_title_label": {
"type": "label",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"layer": 2,
"color": "$title_text_color",
"text": "#section_title",
"text_alignment": "center",
"bindings": [
{
"binding_name": "#section_title"
}
]
},
// upper left title
"dialog_title_label": {
"type": "label",
"anchor_from": "top_left",
"anchor_to": "top_left",
"layer": 2,
"color": "$title_text_color",
"text": "#dialog_title",
"bindings": [
{
"binding_name": "#dialog_title"
}
]
},
"dialog_titles": {
"type": "stack_panel",
"orientation": "horizontal",
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ "100%", 15 ],
"offset": [ 0, 3.5 ],
"controls": [
{
"left_padding": {
"type": "panel",
"size": [ 18, "100%" ]
}
},
{
"dialog_title_label@settings_common.dialog_title_label": {
"size": [ "40% - 3px", "100%" ]
}
},
{
"center_padding": {
"type": "panel",
"size": [ 9, "100%" ]
}
},
{
"section_title_label@settings_common.section_title_label": {
"size": [ "fill", "100%" ]
}
},
{
"right_padding_is_always_right": {
"type": "panel",
"size": [ 22, "100%" ]
}
}
]
},
"dialog_content": {
"type": "panel",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"controls": [
{ "dialog_titles@settings_common.dialog_titles": {} },
{ "selector_area@settings_common.selector_area": {} },
{ "content_area@settings_common.content_area": {} },
{ "section_divider@settings_common.section_divider": {} }
]
},
"selector_group_label": {
"type": "label",
"size": [ "100%", "default" ],
"color": "$main_header_text_color",
"offset": [ 15, 0 ]
},
"scrollable_selector_area_content": {
"type": "panel",
"offset": [ "2px", "2px" ],
"size": [ "100% - 4px", "100%c + 4px" ],
"controls": [
{ "$selector_stack_panel@$selector_stack_panel": {} }
]
},
// left side
"selector_area": {
"type": "panel",
"offset": [ 2, "21px" ],
"size": [ "40% - 3px", "100% - 19px" ],
"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": "settings_common.scrollable_selector_area_content",
"$show_background": false,
"$scroll_size": [ "5px", "100% - 4px" ],
"$scroll_bar_left_padding_size": [ 1, 0 ]
}
}
]
},
// right side
"content_area": {
"type": "panel",
"offset": [ "-1px", "21px" ],
"size": [ "60% - 8px", "100% - 19px" ],
"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",
"ttsSectionContainer": true,
"controls": [
{
"control": {
"type": "stack_panel",
"size": [ "100%", "100%" ],
"anchor_from": "top_right",
"anchor_to": "top_right",
"controls": [
{
"header_panel": {
"type": "panel",
"layer": 20,
"size": [ "100%", "100%c" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [
{
"content@$section_header_panels": {}
}
]
}
},
{
"scrolling_panel@common.scrolling_panel": {
"size": [ "100%", "fill" ],
"$scrolling_content": "$section_content_panels",
"$show_background": false,
"$scroll_size": [ "5px", "100% - 4px" ],
"$scroll_bar_left_padding_size": [ 1, 0 ]
}
},
{
"footer_panel": {
"type": "panel",
"layer": 20,
"size": [ "100%", "100%c" ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"controls": [
{
"content@$section_footer_panels": {}
}
]
}
}
]
}
}
]
},
// divider between two sides
"section_divider": {
"type": "image",
"offset": [ "40%", "20px" ],
"size": [ "4px", "100% - 18px" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"layer": 3,
"texture": "textures/ui/HowToPlayDivider"
},
"screen_base@settings_common.dynamic_dialog_screen": {
"$dialog_content": "settings_common.dialog_content"
}
}