/********************************************************
+*   (c) Mojang. All rights reserved                       *
+*   (c) Microsoft. All rights reserved.                   *
+*********************************************************/

{
  "namespace": "controls_section",

  //Button with text-binding capabilities

  "binding_button@common_buttons.light_content_button": {
    "$pressed_button_name": "button.binding_button",
    "$button_content": "controls_section.binding_button_content",
    "bindings": [
      {
        "binding_type": "collection_details",
        "binding_collection_name": "$keymapping_collection"
      }
    ]
  },

  "binding_button_content@common_buttons.button_content_panel": {
    "controls": [
      {
        "default_label@common.new_button_label": {
          "text": "#binding_button_text",
          "tts_override_control_value": " ",
          "bindings": [
            {
              "binding_name": "#binding_button_text",
              "binding_condition": "none",
              "binding_type": "collection",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      }
    ]
  },

  // Image binding button

  "image_binding_button@common_buttons.light_content_button": {
    "$pressed_button_name": "button.binding_button",
    "$button_content": "controls_section.image_binding_button_content",
    "bindings": [
      {
        "binding_type": "collection_details",
        "binding_collection_name": "$keymapping_collection"
      }
    ]
  },

  "image_binding_button_content@common_buttons.button_content_panel": {
    "controls": [
      {
        "base_icon_image": {
          "type": "image",
          "size": [ 26, 26 ],
          "layer": 1,
          "$gameplay_key_icon|default": "#binding_icon_sprite",
          "bindings": [
            {
              "binding_name": "$gameplay_key_icon",
              "binding_name_override": "#texture",
              "binding_type": "collection",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      },
      {
        "default_label@common.new_button_label": {
          "text": "#binding_button_text",
          "bindings": [
            {
              "binding_name": "#binding_button_text",
              "binding_type": "collection",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      }
    ]
  },

  // reset binding button

  "arrow_reset": {
    "type": "image",
    "layer": 2,
    "size": [ 16, 16 ],
    "texture": "textures/ui/undoArrow"
  },

  "reset_binding_button@common_buttons.light_glyph_button": {
    "layer": 1,
    "$button_content": "controls_section.arrow_reset",
    "$pressed_button_name": "button.reset_binding"
  },

  // keyboard controls
  "keymapping_item": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "layer": 1,
    "size": [ "100%", 35 ],
    "controls": [
      {
        "option_info_label_control": {
          "type": "image",
          "texture": "textures/ui/text_label_box",
          "size": [ "fill", "100% - 4px" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "controls": [
            {
              "keymapping_label_control": {
                "type": "label",
                "color": "$generic_button_text_color",
                "size": [ "100% - 4px", "default" ],
                "text_alignment": "center",
                "layer": 1,
                "text": "#keymapping_name",
                "bindings": [
                  {
                    "binding_name": "#keymapping_name",
                    "binding_type": "collection",
                    "binding_collection_name": "$keymapping_collection"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "keymapping_button_0@binding_button": {
          "$button_tts_header": "#audible_keymapping_name",
          "size": [ "40% + 1px", "100% - 4px" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$keymapping_collection"
            },
            {
              "binding_name": "#audible_keymapping_name",
              "binding_type": "collection",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      },
      {
        "keymapping_button_1@controls_section.reset_binding_button": {
          "size": [ "15% + 1px", "100% - 4px" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "$pressed_button_name": "button.reset_binding",
          "$button_tts_header": "accessibility.settings.reset",
          "bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      }
    ]
  },

  "keymapping_grid": {
    "type": "grid",
    "size": [ "100%", "default" ],
    "layer": 1,
    "grid_item_template": "controls_section.keymapping_item",
    "grid_dimension_binding": "$keymapping_grid_dimension",
    "collection_name": "$keymapping_collection",
    "anchor_to": "top_right",
    "anchor_from": "top_right",
    "bindings": [
      {
        "binding_name": "$keymapping_grid_dimension"
      }
    ]
  },

  // Key mappings to mimic mouse functionality if full keyboard gameplay is enabled
  "full_keymapping_grid@controls_section.keymapping_grid": {
    "$keymapping_grid_dimension": "#keyboard_full_grid_dimension",
    "$keymapping_collection": "keyboard_full_collection"
  },


  // gamepad controls
  "gamepad_mapping_item": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "layer": 1,
    "size": [ "100%", 35 ],
    "controls": [
      {
        "option_info_label_control": {
          "type": "image",
          "texture": "textures/ui/text_label_box",
          "size": [ "fill", "100% - 4px" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "controls": [
            {
              "keymapping_label_control": {
                "type": "label",
                "color": "$generic_button_text_color",
                "size": [ "100% - 4px", "default" ],
                "text_alignment": "center",
                "layer": 1,
                "text": "#keymapping_name",
                "bindings": [
                  {
                    "binding_name": "#keymapping_name",
                    "binding_type": "collection",
                    "binding_collection_name": "$keymapping_collection"
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "keymapping_button_0@controls_section.image_binding_button": {
          "$button_tts_header": "#audible_keymapping_name",
          "size": [ "20% + 1px", "100% - 4px" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$keymapping_collection"
            },
            {
              "binding_name": "#audible_keymapping_name",
              "binding_type": "collection",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      },
      {
        "keymapping_button_1@controls_section.reset_binding_button": {
          "size": [ "15% + 1px", "100% - 4px" ],
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "$pressed_button_name": "button.reset_binding",
          "$button_tts_header": "accessibility.settings.reset",
          "bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "$keymapping_collection"
            }
          ]
        }
      }
    ]
  },

  "gamepad_mapping_grid": {
    "type": "grid",
    "size": [ "100%", "default" ],
    "layer": 1,
    "grid_item_template": "controls_section.gamepad_mapping_item",
    "grid_dimension_binding": "$keymapping_grid_dimension",
    "collection_name": "$keymapping_collection",
    "anchor_to": "top_right",
    "anchor_from": "top_right",
    "bindings": [
      {
        "binding_name": "$keymapping_grid_dimension"
      }
    ]
  },

  // Keyboard and Mouse button & section

  "keyboard_and_mouse_button@settings_common.section_toggle_base": {
    "$toggle_view_binding_name": "keyboard_and_mouse_button_toggle",
    "$glyph_texture": "textures/ui/keyboard_and_mouse_glyph",
    "$glyph_color_texture": "textures/ui/keyboard_and_mouse_glyph_color",
    "$glyph_size": [ 19, 9 ],
    "$button_text": "options.keyboardAndMouse",
    "$toggle_property_bag": {
      "#panel_title": "options.keyboardAndMouseSettings"
    }
  },

  "keyboard_and_mouse_section": {
    "type": "stack_panel",
    "size": [ "100%", "100%c" ],
    "$keymapping_grid_dimension": "#keyboard_standard_grid_dimension",
    "$keymapping_collection": "keyboard_standard_collection",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "keyboard_and_mouse_button_toggle",
        "source_property_name": "#toggle_state",
        "target_property_name": "#visible"
      }
    ],
    "controls": [
      {
        "option_slider_0@settings_common.option_slider": {
          "$option_label": "#keyboard_mouse_sensitivity_slider_label",
          "$slider_name": "keyboard_mouse_sensitivity",
          "$slider_value_binding_name": "#keyboard_mouse_sensitivity",
          "$slider_tts_text_value": "#keyboard_mouse_sensitivity_text_value",
          "$option_enabled_binding_name": "#keyboard_mouse_sensitivity_enabled",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_slider_damen@settings_common.option_slider": {
          "$option_label": "#spyglass_mouse_dampening_slider_label",
          "$slider_name": "spyglass_mouse_dampening",
          "$slider_value_binding_name": "#spyglass_mouse_dampening",
          "$slider_tts_text_value": "#spyglass_mouse_dampening_text_value",
          "$option_enabled_binding_name": "#keyboard_mouse_sensitivity_enabled",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_slider_1@settings_common.option_slider": {
          "ignored": "(not $is_holographic)",
          "$option_label": "#vr_ui_mouse_sensitivity_slider_label",
          "$slider_name": "vr_ui_mouse_sensitivity",
          "$slider_value_binding_name": "#vr_ui_mouse_sensitivity",
          "$slider_tts_text_value": "#vr_ui_mouse_sensitivity_text_value",
          "$option_enabled_binding_name": "#vr_ui_mouse_sensitivity_enabled",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_toggle_0@settings_common.option_toggle": {
          "$option_label": "options.invertYAxis",
          "$option_binding_name": "#keyboard_mouse_invert_y_axis",
          "$option_enabled_binding_name": "#keyboard_mouse_invert_y_axis_enabled",
          "$toggle_name": "keyboard_mouse_invert_y_axis",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_1@settings_common.option_toggle": {
          "$option_label": "options.autojump",
          "$option_binding_name": "#keyboard_mouse_autojump",
          "$option_enabled_binding_name": "#keyboard_mouse_autojump_enabled",
          "$toggle_name": "keyboard_mouse_autojump",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_2@settings_common.option_toggle": {
          "ignored": true, // Remove this line when Options::TOGGLE_CROUCH actually affects crouch behavior (User Story 30117)
          "$option_label": "options.toggleCrouch",
          "$option_binding_name": "#keyboard_mouse_toggle_crouch",
          "$option_enabled_binding_name": "#keyboard_mouse_toggle_crouch_enabled",
          "$toggle_name": "keyboard_mouse_toggle_crouch"
        }
      },
      {
        "option_toggle_full_keyboard_gameplay@settings_common.option_toggle": {
          "$option_label": "options.fullKeyboardGameplay",
          "$option_binding_name": "#keyboard_show_full_keyboard_options",
          "$option_enabled_binding_name": "#keyboard_show_full_keyboard_options_enabled",
          "$toggle_name": "keyboard_show_full_keyboard_options",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_show_keyboard_prompts@settings_common.option_toggle": {
          "ignored": "(not $education_edition)",
          "$option_label": "options.showKeyboardPrompts",
          "$option_binding_name": "#show_keyboard_prompts",
          "$option_enabled_binding_name": "#hint_toggles_enabled",
          "$toggle_name": "show_keyboard_prompts",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_show_learning_prompts@settings_common.option_toggle": {
          "ignored": "(not $education_edition)",
          "$option_label": "options.showLearningPrompts",
          "$option_binding_name": "#show_learning_prompts",
          "$option_enabled_binding_name": "#hint_toggles_enabled",
          "$toggle_name": "show_learning_prompts",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        // Section that shows the keymappings for the standard keyboard layout
        "keyboard_section": {
          "type": "stack_panel",
          "size": [ "100%", "100%c" ],
          "bindings": [
            {
              // Hide this section when another keyboard type/layout is enabled
              "binding_name": "#keyboard_show_standard_keyboard_options",
              "binding_name_override": "#visible"
            }
          ],
          "controls": [
            {
              "option_group_label@settings_common.option_group_label": {
                "$text": "options.keyboardLayout"
              }
            },
            {
              "keyboard_keymapping_grid@controls_section.keymapping_grid": {}
            },
            {
              "control_alt_chords_standard_keyboard_section": {
                "type": "stack_panel",
                "size": [ "100%", "100%c" ],
                "bindings": [
                  {
                    // Show full keyboard section when the full keyboard toggle is enabled
                    "binding_name": "#show_standard_copy_coordinates_keys",
                    "binding_name_override": "#visible"
                  }
                ],
                "controls": [
                  {
                    "option_group_label@settings_common.option_group_label": {
                      "$text": "options.control_alt_keybinds_section"
                    }
                  },
                  {
                    "control_alt_chord_keymapping_grid@controls_section.keymapping_grid": {
                      "$keymapping_grid_dimension": "#keyboard_standard_control_alt_chord_grid_dimension",
                      "$keymapping_collection": "keyboard_standard_control_alt_chord_collection"
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        // Section that shows the keymappings for the full keyboard layout
        "full_keyboard_section": {
          "type": "stack_panel",
          "size": [ "100%", "100%c" ],
          "bindings": [
            {
              // Show full keyboard section when the full keyboard toggle is enabled
              "binding_name": "#keyboard_show_full_keyboard_options",
              "binding_name_override": "#visible"
            }
          ],
          "controls": [
            {
              "option_slider_smooth_rotation_speed@settings_common.option_slider": {
                "$option_label": "#keyboard_smooth_rotation_speed_slider_label",
                "$slider_name": "keyboard_smooth_rotation_speed",
                "$slider_value_binding_name": "#keyboard_smooth_rotation_speed",
                "$slider_tts_text_value": "#keyboard_smooth_rotation_speed_text_value",
                "$option_enabled_binding_name": "#keyboard_smooth_rotation_speed_enabled",
                "$focus_override_right": "FOCUS_OVERRIDE_STOP",
                "$label_bindings": [
                  {
                    "binding_name": "$option_label"
                  }
                ]
              }
            },
            {
              "full_keyboard_label@settings_common.option_group_label": {
                "$text": "options.fullKeyboardLayout"
              }
            },
            {
              "keyboard_full_keymapping_grid@controls_section.full_keymapping_grid": {}
            },
            {
              "control_alt_chords_full_keyboard_section": {
                "type": "stack_panel",
                "size": [ "100%", "100%c" ],
                "bindings": [
                  {
                    // Show full keyboard section when the full keyboard toggle is enabled
                    "binding_name": "#show_full_copy_coordinates_keys",
                    "binding_name_override": "#visible"
                  }
                ],
                "controls": [
                  {
                    "option_group_label@settings_common.option_group_label": {
                      "$text": "options.control_alt_keybinds_section"
                    }
                  },
                  {
                    "control_alt_chord_keymapping_grid@controls_section.keymapping_grid": {
                      "$keymapping_grid_dimension": "#keyboard_full_control_alt_chord_grid_dimension",
                      "$keymapping_collection": "keyboard_full_control_alt_chord_collection"
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "reset_button@settings_common.action_button": {
          "$pressed_button_name": "button.reset_keyboard_bindings",
          "$button_text": "controllerLayoutScreen.resetAllBindings",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      }
    ]
  },

  // Controller button & section

  "controller_button@settings_common.section_toggle_base": {
    "$toggle_view_binding_name": "controller_button_toggle",
    "$glyph_texture": "textures/ui/controller_glyph",
    "$glyph_color_texture": "textures/ui/controller_glyph_color",
    "$glyph_size": [ 21, 14 ],
    "$button_text": "options.controller",
    "$toggle_property_bag": {
      "#panel_title": "options.controllerSettings"
    }
  },

  "controller_section": {
    "type": "stack_panel",
    "size": [ "100%", "100%c" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "$keymapping_grid_dimension": "#gamepad_grid_dimension",
    "$keymapping_collection": "gamepad_collection",
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "controller_button_toggle",
        "source_property_name": "#toggle_state",
        "target_property_name": "#visible"
      }
    ],
    "controls": [
      {
        "option_slider_0@settings_common.option_slider": {
          "ignored": "($is_holographic and not $is_living_room_mode)",
          "$option_label": "#controller_sensitivity_slider_label",
          "$slider_name": "controller_sensitivity",
          "$slider_value_binding_name": "#controller_sensitivity",
          "$slider_tts_text_value": "#controller_sensitivity_text_value",
          "$option_enabled_binding_name": "#controller_sensitivity_enabled",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_slider_damen@settings_common.option_slider": {
          "$option_label": "#spyglass_gamepad_dampening_slider_label",
          "$slider_name": "spyglass_gamepad_dampening",
          "$slider_value_binding_name": "#spyglass_gamepad_dampening",
          "$slider_tts_text_value": "#spyglass_gamepad_dampening_text_value",
          "$option_enabled_binding_name": "#keyboard_mouse_sensitivity_enabled",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_slider_1@settings_common.option_slider": {
          "ignored": "($is_living_room_mode or not $is_holographic)",
          "$option_label": "#vr_sensitivity_slider_label",
          "$slider_name": "vr_sensitivity",
          "$slider_value_binding_name": "#vr_sensitivity",
          "$slider_tts_text_value": "#vr_sensitivity_text_value",
          "$option_enabled_binding_name": "#vr_sensitivity_enabled",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_slider_2@settings_common.option_slider": {
          "$option_label": "#vr_roll_turn_sensitivity_slider_label",
          "$slider_name": "vr_roll_turn_sensitivity",
          "$slider_value_binding_name": "#vr_roll_turn_sensitivity",
          "$slider_tts_text_value": "#vr_roll_turn_sensitivity_text_value",
          "$option_enabled_binding_name": "#vr_roll_turn_sensitivity_enabled",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ],
          "bindings": [
            {
              "binding_name": "#vr_roll_turn_sensitivity_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
      {
        "option_toggle_0@settings_common.option_toggle": {
          "$option_label": "options.invertYAxis",
          "$option_binding_name": "#controller_invert_y_axis",
          "$option_enabled_binding_name": "#controller_invert_y_axis_enabled",
          "$toggle_name": "controller_invert_y_axis",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_1@settings_common.option_toggle": {
          "ignored": "($is_holographic and not $is_living_room_mode)",
          "$option_label": "options.autojump",
          "$option_binding_name": "#controller_autojump",
          "$option_enabled_binding_name": "#controller_autojump_enabled",
          "$toggle_name": "controller_autojump",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle9@settings_common.option_toggle": {
          "$option_label": "options.hidetooltips",
          "$option_binding_name": "#hide_tooltips",
          "$option_enabled_binding_name": "#hint_toggles_enabled",
          "$toggle_name": "hide_tooltips",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle10@settings_common.option_toggle": {
          "$option_label": "options.hidegamepadcursor",
          "$option_binding_name": "#hide_gamepad_cursor",
          "$option_enabled_binding_name": "#hide_gamepad_cursor_enabled",
          "$toggle_name": "hide_gamepad_cursor",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_11@settings_common.option_toggle": {
          "$option_label": "options.clearhotbar",
          "$option_binding_name": "#controller_clear_hotbar",
          "$option_enabled_binding_name": "#controller_clear_hotbar_enabled",
          "$toggle_name": "controller_clear_hotbar",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "gamepad_swap_ab@settings_common.option_toggle": {
          "$option_label": "#swap_gamepad_ab",
          "$option_binding_name": "#swap_gamepad_ab_buttons",
          "$option_enabled_binding_name": "#swap_gamepad_ab_buttons_enabled",
          "$toggle_name": "swap_gamepad_ab_buttons",
          "$toggle_tts_header_binding_type": "global",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "gamepad_swap_xy@settings_common.option_toggle": {
          "$option_label": "#swap_gamepad_xy",
          "$option_binding_name": "#swap_gamepad_xy_buttons",
          "$option_enabled_binding_name": "#swap_gamepad_xy_buttons_enabled",
          "$toggle_name": "swap_gamepad_xy_buttons",
          "$toggle_tts_header_binding_type": "global",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "gamepad_cursor_sensitivity_option_slider@settings_common.option_slider": {
          "$option_label": "#gamepad_cursor_sensitivity_slider_label",
          "$slider_name": "gamepad_cursor_sensitivity",
          "$slider_value_binding_name": "#gamepad_cursor_sensitivity",
          "$slider_tts_text_value": "#gamepad_cursor_sensitivity_text_value",
          "$option_enabled_binding_name": "#gamepad_cursor_sensitivity_enabled",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      },
      {
        "option_toggle_2@settings_common.option_toggle": {
          "ignored": "($is_living_room_mode or not $is_holographic)",
          "$option_label": "options.vrAutojump",
          "$option_binding_name": "#vr_autojump",
          "$option_enabled_binding_name": "#vr_autojump_enabled",
          "$toggle_name": "vr_autojump",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_3@settings_common.option_toggle": {
          "ignored": true, // Remove this line when Options::TOGGLE_CROUCH actually affects crouch behavior (User Story 30117)
          "$option_label": "options.toggleCrouch",
          "$option_binding_name": "#controller_toggle_crouch",
          "$option_enabled_binding_name": "#controller_toggle_crouch_enabled",
          "$toggle_name": "controller_toggle_crouch",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_4@settings_common.option_toggle": {
          "ignored": true, // TODO: Remove this line when we add in haptic feedback (User Story 41617)
          "$option_label": "options.destroyvibration",
          "$option_binding_name": "#controller_destroy_vibration",
          "$option_enabled_binding_name": "#controller_destroy_vibration_enabled",
          "$toggle_name": "controller_destroy_vibration",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },
      {
        "option_toggle_5@settings_common.option_toggle": {
          "ignored": true, // TODO: Remove this line when we add in haptic feedback (User Story 41617)
          "$option_label": "options.splitvibration",
          "$option_binding_name": "#controller_split_vibration",
          "$option_enabled_binding_name": "#controller_split_vibration_enabled",
          "$toggle_name": "controller_split_vibration",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      },

      {
        "option_group_label@settings_common.option_group_label": {
          "ignored": "$ignore_controller_layout",
          "$text": "options.controllerLayout"
        }
      },
      {
        "gamepad_keymapping_grid@controls_section.gamepad_mapping_grid": {
          "ignored": "$ignore_controller_layout"
        }
      },
      {
        "reset_button@settings_common.action_button": {
          "$pressed_button_name": "button.reset_gamepad_bindings",
          "$button_text": "controllerLayoutScreen.resetAllBindings",
          "$focus_override_right": "FOCUS_OVERRIDE_STOP"
        }
      }
    ]
  },

  // Touch button & section

  "touch_button@settings_common.section_toggle_base": {
    "$toggle_view_binding_name": "touch_button_toggle",
    "$glyph_texture": "textures/ui/touch_glyph",
    "$glyph_color_texture": "textures/ui/touch_glyph_color",
    "$glyph_size": [ 20, 14 ],
    "$button_text": "options.touch",
    "$toggle_property_bag": {
      "#panel_title": "options.touchSettings"
    }
  },

  "touch_section": {
    "type": "stack_panel",
    "size": [ "100%", "100%c" ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "touch_button_toggle",
        "source_property_name": "#toggle_state",
        "target_property_name": "#visible"
      }
    ],
    "controls": [
      {
        "common_touch_settings": {
          "type": "stack_panel",
          "size": [ "100%", "100%c" ],
          "controls": [
            {
              "option_enable_new_touch_control_schemes_button@settings_common.option_toggle": {
                "$option_label": "options.enableNewTouchControlSchemes",
                "$option_binding_name": "#enable_new_touch_control_schemes",
                "$option_enabled_binding_name": "#enable_new_touch_control_schemes_enabled",
                "$toggle_name": "enable_new_touch_control_schemes",
                "bindings": [
                  {
                    "binding_name": "#new_touch_control_schemes_preview_enabled",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "control_scheme_section": {
                "type": "stack_panel",
                "size": [ "100%", "100%c" ],
                "controls": [
                  {
                    "section_label": {
                      "type": "label",
                      "color": "$body_text_color",
                      "text": "options.controlMode.title"
                    }
                  },
                  {
                    "padding_0": {
                      "type": "panel",
                      "size": [ "100%", "5px" ]
                    }
                  },
                  {
                    "image_and_button": {
                      "type": "stack_panel",
                      "orientation": "horizontal",
                      "size": [ "100%", "100%cm" ],
                      "controls": [
                        {
                          "images": {
                            "type": "panel",
                            "size": [ "49%", "50%x" ],
                            "controls": [
                              {
                                "touch_image": {
                                  "type": "image",
                                  "texture": "textures/ui/thumbnail_touch",
                                  "bindings": [
                                    {
                                      "binding_name": "#touch_selected",
                                      "binding_name_override": "#visible"
                                    }
                                  ]
                                }
                              },
                              {
                                "crosshair_image": {
                                  "type": "image",
                                  "texture": "textures/ui/thumbnail_crosshair",
                                  "bindings": [
                                    {
                                      "binding_name": "#crosshair_selected",
                                      "binding_name_override": "#visible"
                                    }
                                  ]
                                }
                              },
                              {
                                "classic_image": {
                                  "type": "image",
                                  "texture": "textures/ui/thumbnail_classic",
                                  "bindings": [
                                    {
                                      "binding_name": "#classic_selected",
                                      "binding_name_override": "#visible"
                                    }
                                  ]
                                }
                              }
                            ]
                          }
                        },
                        {
                          "padding": {
                            "type": "panel",
                            "size": [ "1%", "1px" ]
                          }
                        },
                        {
                          "scheme_button_section": {
                            "type": "panel",
                            "size": [ "50%", "100%sm" ],
                            "controls": [
                              {
                                "caption": {
                                  "type": "stack_panel",
                                  "anchor_to": "top_middle",
                                  "anchor_from": "top_middle",
                                  "size": [ "100%", "100%" ],
                                  "controls": [
                                    {
                                      "selected_label": {
                                        "type": "label",
                                        "font_scale_factor": 0.9,
                                        "color": "$body_text_color",
                                        "text": "options.controlMode.Selected"
                                      }
                                    },
                                    {
                                      "selected_control": {
                                        "type": "label",
                                        "font_scale_factor": 0.9,
                                        "size": [ "100%", "fill" ],
                                        "color": "$body_text_color",
                                        "text": "#selected_control_scheme",
                                        "bindings": [
                                          {
                                            "binding_name": "#selected_control_scheme_name",
                                            "binding_name_override": "#selected_control_scheme"
                                          }
                                        ]
                                      }
                                    }
                                  ]
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },
                  {
                    "padding_1": {
                      "type": "panel",
                      "size": [ "100%", "3px" ]
                    }
                  },
                  {
                    "select_control_mode@settings_common.action_button": {
                      "$pressed_button_name": "button.select_control_mode",
                      "$button_text": "options.controlMode.selectControlMode",
                      "size": [ "100%", 30 ],
                      "anchor_to": "bottom_middle",
                      "anchor_from": "bottom_middle"
                    }
                  },
                  {
                    "padding_2": {
                      "type": "panel",
                      "size": [ "100%", "5px" ]
                    }
                  }
                ],
                "bindings": [
                  {
                    "binding_name": "#new_touch_control_schemes_settings",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_resizable_ui@settings_common.option_toggle": {
                "$option_label": "options.resizableUI",
                "$option_binding_name": "#resizable_ui",
                "$option_enabled_binding_name": "#resizable_ui_enabled",
                "$toggle_name": "resizable_ui"
              }
            },
            {
              "modify_control_layout_section": {
                "type": "stack_panel",
                "size": [ "100%", "100%c" ],
                "controls": [
                  {
                    "modify_control_layout_button@settings_common.action_button": {
                      "$pressed_button_name": "button.modify_control_layout",
                      "$button_text": "hudScreen.controlCustomization.customiseControls",
                      "$focus_override_down": "FOCUS_OVERRIDE_STOP",
                      "size": [ "100%", 30 ],
                      "bindings": [
                        {
                          "binding_name": "#modify_layout_enabled",
                          "binding_name_override": "#enabled"
                        }
                      ]
                    }
                  },
                  { 
                    "customize_tooltip_option@controls_section.customize_tooltip_option": {} 
                  },
                  {
                    "padding": {
                      "type": "panel",
                      "size": [ "100%", "5px" ]
                    }
                  }
                ],
                "bindings": [
                  {
                    "binding_name": "#resizable_ui_active",
                    "binding_name_override": "#visible",
                    "binding_type": "global"
                  }
                ]
              }
            },
            {
              "option_slider_0@settings_common.option_slider": {
                "$option_label": "#touch_sensitivity_slider_label",
                "$slider_name": "touch_sensitivity",
                "$slider_value_binding_name": "#touch_sensitivity",
                "$slider_tts_text_value": "#touch_sensitivity_text_value",
                "$option_enabled_binding_name": "#touch_sensitivity_enabled",
                "$label_bindings": [
                  {
                    "binding_name": "$option_label"
                  }
                ]
              }
            },
            {
              "option_slider_damen@settings_common.option_slider": {
                "$option_label": "#spyglass_touch_dampening_slider_label",
                "$slider_name": "spyglass_touch_dampening",
                "$slider_value_binding_name": "#spyglass_touch_dampening",
                "$slider_tts_text_value": "#spyglass_touch_dampening_text_value",
                "$option_enabled_binding_name": "#touch_sensitivity_enabled",
                "$label_bindings": [
                  {
                    "binding_name": "$option_label"
                  }
                ]
              }
            },
            {
              "option_show_action_button@settings_common.option_toggle": {
                "$option_label": "options.showActionButton",
                "$option_binding_name": "#show_action_button",
                "$option_enabled_binding_name": "#show_action_button_enabled",
                "$toggle_name": "show_action_button",
                "bindings": [
                  {
                    "binding_name": "#touch_controls_v2_crosshair_mode",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_toggle_auto_jump@settings_common.option_toggle": {
                "$option_label": "options.autojump",
                "$option_binding_name": "#touch_autojump",
                "$option_enabled_binding_name": "#touch_autojump_enabled",
                "$toggle_name": "touch_autojump"
              }
            },
            {
              "option_bool_sprint_on_movement@settings_common.option_toggle": {
                "$option_label": "options.sprintOnMovement",
                "$option_binding_name": "#sprint_on_movement",
                "$option_enabled_binding_name": "#sprint_on_movement_enabled",
                "$toggle_name": "sprint_on_movement",
                "bindings": [
                  {
                    "binding_name": "#touch_controls_v2",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "joystick_visibility_dropdown@settings_common.option_dropdown": {
                "$option_label": "options.joystickVisibilityOption",
                "$dropdown_content": "controls_section.joystick_visibility_dropdown_content",
                "$dropdown_area": "content_area",
                "$dropdown_name": "joystick_visibility_dropdown",
                "$option_enabled_binding_name": "#joystick_visibility_dropdown_enabled",
                "$options_dropdown_toggle_label_binding": "#joystick_visibility_dropdown_toggle_label",
                "$dropdown_scroll_content_size": [ "100%", "200%" ],
                "bindings": [
                  {
                    "binding_name": "#touch_controls_v2",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_slider_thumbstick_opacity@settings_common.option_slider": {
                "$option_label": "#thumbstick_opacity_slider_label",
                "$slider_name": "thumbstick_opacity",
                "$slider_value_binding_name": "#thumbstick_opacity",
                "$slider_tts_text_value": "#thumbstick_opacity_text_value",
                "$option_enabled_binding_name": "#thumbstick_opacity_enabled",
                "$label_bindings": [
                  {
                    "binding_name": "$option_label"
                  }
                ],
                "bindings": [
                  {
                    "binding_name": "#is_thumbstick_visible",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "sneak_dropdown@settings_common.option_dropdown": {
                "$option_label": "options.sneakOption",
                "$dropdown_content": "controls_section.sneak_dropdown_content",
                "$dropdown_area": "content_area",
                "$dropdown_name": "sneak_dropdown",
                "$option_enabled_binding_name": "#sneak_dropdown_enabled",
                "$options_dropdown_toggle_label_binding": "#sneak_dropdown_toggle_label",
                "$dropdown_scroll_content_size": [ "100%", "145%" ],
                "bindings": [
                  {
                    "binding_name": "#touch_controls_v2",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_slider_1@settings_common.option_slider": {
                "$option_label": "#button_size_slider_label",
                "$slider_name": "button_size",
                "$slider_value_binding_name": "#button_size",
                "$slider_tts_text_value": "#button_size_text_value",
                "$option_enabled_binding_name": "#button_size_enabled",
                "$label_bindings": [
                  {
                    "binding_name": "$option_label"
                  }
                ]
              }
            },
            {
              "option_toggle_destroy_vibration@settings_common.option_toggle": {
                "$option_label": "options.destroyvibration",
                "$option_binding_name": "#touch_destroy_vibration",
                "$option_enabled_binding_name": "#touch_destroy_vibration_enabled",
                "$toggle_name": "touch_destroy_vibration"
              }
            },
            {
              "option_toggle_split_vibration@settings_common.option_toggle": {
                "$option_label": "options.splitvibration",
                "$option_binding_name": "#touch_split_vibration",
                "$option_enabled_binding_name": "#touch_split_vibration_enabled",
                "$toggle_name": "touch_split_vibration"
              }
            },
            {
              "option_creative_delayed_block_breaking@settings_common.option_toggle": {
                "$option_label": "options.creativeDelayedBlockBreaking",
                "$option_binding_name": "#creative_delayed_block_breaking",
                "$option_enabled_binding_name": "#creative_delayed_block_breaking_enabled",
                "$toggle_name": "creative_delayed_block_breaking",
                "bindings": [
                  {
                    "binding_name": "(not #crosshair_action_button_on)",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_toggle_invert_y@settings_common.option_toggle": {
                "$option_label": "options.invertYAxis",
                "$option_binding_name": "#touch_invert_y_axis",
                "$option_enabled_binding_name": "#touch_invert_y_axis_enabled",
                "$toggle_name": "touch_invert_y_axis"
              }
            },
            {
              "option_always_highlight_hovering_box_in_crosshair@settings_common.option_toggle": {
                "$option_label": "options.alwaysHighlightHoveringBoxInCrosshair",
                "$option_binding_name": "#always_highlight_hovering_box_in_crosshair",
                "$option_enabled_binding_name": "#always_highlight_hovering_box_in_crosshair_enabled",
                "$toggle_name": "always_highlight_hovering_box_in_crosshair",
                "bindings": [
                  {
                    "binding_name": "#touch_controls_v2_crosshair_mode",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_toggle_use_touchpad@settings_common.option_toggle": {
                "$option_label": "options.usetouchpad",
                "$option_binding_name": "#split_controls",
                "$option_enabled_binding_name": "#split_controls_enabled",
                "$toggle_name": "split_controls",
                "bindings": [
                  {
                    "binding_name": "(not #touch_controls_v2)",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "option_toggle_swap_jump_and_sneak@settings_common.option_toggle": {
                "$option_label": "options.swapJumpAndSneak",
                "$option_binding_name": "#swap_jump_and_sneak",
                "$option_enabled_binding_name": "#swap_jump_and_sneak_enabled",
                "$toggle_name": "swap_jump_and_sneak",
                "bindings": [
                  {
                    "binding_name": "(not #touch_controls_v2)",
                    "binding_name_override": "#visible"
                  }
                ]
              }
            },
            {
              "hotbar_only_touch_toggle@settings_common.option_toggle": {
                "$option_label": "options.hotbarOnlyTouch",
                "$option_binding_name": "#hotbar_only_touch",
                "$option_enabled_binding_name": "#hotbar_only_touch_enabled",
                "$toggle_name": "hotbar_only_touch"
              }
            }
          ]
        }
      },
      {
        "reset_button@settings_common.action_button": {
          "$pressed_button_name": "button.reset_touch_bindings",
          "$button_text": "controllerLayoutScreen.resetAllBindings",
          "$focus_override_down": "FOCUS_OVERRIDE_STOP"
        }
      }
    ]
  },

  "joystick_visibility_dropdown_content@settings_common.option_radio_dropdown_group": {
    "$radio_buttons": [
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#joystick_visibility_visible",
          "$radio_label_text": "options.joystickVisibilityOption.visibleJoystick"
        }
      },
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#joystick_visibility_hidden",
          "$radio_label_text": "options.joystickVisibilityOption.hiddenJoystick"
        }
      },
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#joystick_visibility_hidden_when_unused",
          "$radio_label_text": "options.joystickVisibilityOption.hiddenJoystickWhenUnused"
        }
      }
    ]
  },

  "sneak_dropdown_content@settings_common.option_radio_dropdown_group": {
    "$radio_buttons": [
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#sneak_toggle",
          "$radio_label_text": "options.sneakOption.toggle"
        }
      },
      {
        "@settings_common.radio_with_label": {
          "$toggle_state_binding_name": "#sneak_hold",
          "$radio_label_text": "options.sneakOption.hold"
        }
      }
    ]
  },
  
  "customize_tooltip_option_image": {
    "type": "image",
    "size": [ 7, 11 ],
    "texture": "textures/ui/infobulb"
  },

  "customize_tooltip_option_popup@common.static_tooltip_popup_with_image_and_text": {
    "size": [ "100% - 4px", "100%cm + 8px" ],
    "anchor_from": "top_middle",
    "anchor_to": "bottom_middle",
    "$tooltip_panel_offset": [ 0, -30 ],
    "$tooltip_popup_image": "textures/ui/infobulb",
    "$tooltip_button_binding_type": "global",
    "$tooltip_button_collection_name": "",
    "$tooltip_popup_visible_binding|default": "#customize_tooltip_option_visible",
    "$tooltip_text_binding_name": "#customize_tooltip_option_text",
    "$tooltip_chevron_anchor": "bottom_right",
    "$tooltip_popup_chevron_offset": [ "-30%x", "100%y - 3px" ]
  },

  "customize_tooltip_option": {
    "type": "panel",
    "size": [ "100%", 0 ],
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "controls": [
      {
        "customize_tooltip_option_image@controls_section.customize_tooltip_option_image": {
          "offset": [ -14, -20 ],
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "layer": 3,
          "controls": [
            {
              "hover_detection_input_panel": {
                "type": "input_panel",
                "consume_hover_events": false,
                "focus_enabled": true,
                "tts_skip_message": true,
                "button_mappings": [
                  {
                    "to_button_id": "button.customize_tooltip_option_is_hovered",
                    "mapping_type": "pressed"
                  }
                ]
              }
            }
          ]
        }
      },
      { 
        "customize_tooltip_option_popup@controls_section.customize_tooltip_option_popup": {} 
      }
    ],
    "bindings": [
      {
         "binding_name": "#resizable_tooltip_enable",
         "binding_name_override": "#visible",
         "binding_type": "global"
      }
    ]
  }
}
