/*File made by @CrisXolt.
//(c) Don't use any code design without permission!*/
{
  "namespace": "host_options_dx",

  /*//// Buttons Assets ////*/

  "return_from_sub_command_button@chat_dx.black_button": {
    "size": [ "100%", 20 ],
    "$button_label_offset": [ 30, 0 ],
    "$button_content": "host_options_dx.button_content",
    "$pressed_button_name": "button.host_main",
    "$button_glyph_texture": "textures/ui/arrowLeft",
    "$glyph_size": [ 8, 8 ],
    "$button_glyph_anchor_from": "left_middle",
    "$button_glyph_anchor_to": "left_middle",
    "$button_content_offset_glyph": [ 10, 0 ]
  },

  "button_content@host_options.button_content": {
    "controls": [
      {
        "button_label@host_options_dx.button_label": {
          "$button_text_color|default": "$text_color",
          "$button_label_anchor_from": "left_middle",
          "$button_label_anchor_to": "left_middle",
          "shadow": true,
          "layer": 8,
          "color": "$text_color"
        }
      },
      {
        "image@host_options.host_glyph_panel": {
          "$offset_glyph": "$button_content_offset_glyph",
          "$button_glyph_anchor_from|default": "center",
          "$button_glyph_anchor_to|default": "center",
          "visible": "$button_glyph_visible",
          "color": "$text_color",
          "layer": 8,
          "size": "$glyph_size"
        }
      }
    ]
  },

  "button_label@common_dx.global_label": {
    "text": "$button_text",
    "$button_label_shadow|default": false,
    "shadow": "$button_label_shadow",
    "$button_label_anchor_from|default": "center",
    "$button_label_anchor_to|default": "center",
    "$button_label_offset|default": [ 0, 0 ],
    "anchor_from": "$button_label_anchor_from",
    "anchor_to": "$button_label_anchor_to",
    "offset": "$button_label_offset",
    "color": "$button_text_color",

    // For text bindings
    "$button_text_binding_type|default": "none",
    "$button_binding_condition|default": "none",
    "$button_text_grid_collection_name|default": "",

    "bindings": [
      {
        "binding_type": "$button_text_binding_type",
        "binding_condition": "$button_binding_condition",
        "binding_collection_name": "$button_text_grid_collection_name",
        "binding_name": "$button_text",
        "binding_name_override": "$button_text"
      }
    ]
  },

  /*//// Time and Weather Buttons ////*/

  "host_sub_command_grid_item": {
    "type": "panel",
    "size": [ "100%", 22 ],
    "controls": [
      {
        "host_option_banner@chat_dx.black_button": {
          "anchor_from": "center",
          "anchor_to": "center",
          "size": [ "100%-2px", 20 ],
          "$glyph_size": [ "16px", "16px" ],
          "$button_text": "#button_text",
          "$button_content": "host_options_dx.button_content",
          "$button_text_binding_type": "collection",
          "$button_text_grid_collection_name": "$grid_collection_name",
          "$pressed_button_name": "button.sub_command",

          "$button_glyph_anchor_from": "left_middle",
          "$button_glyph_anchor_to": "left_middle",
          "$button_content_offset_glyph": [ 4, 0 ],
          "$button_label_offset": [ 30, 0 ],

          "$button_glyph_texture": "#texture",
          "$button_glyph_binding_type": "collection",
          "$button_glyph_grid_collection_name": "$grid_collection_name",

          "property_bag": {
            "#sub_command": ""
          },
          "bindings": [
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#sub_command"
            }
          ]
        }
      }
    ]
  },

  /*//// Friends Buttons ////*/

  "host_friends_tab": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "$button_glyph_anchor_from": "left_middle",
    "$button_glyph_anchor_to": "left_middle",
    "$button_content_offset_label": [ 30, 0 ],
    "$button_content_offset_glyph": [ 10, 0 ],
    "controls": [
      {
        "players_grid@host_options.host_grid": {
          "$grid_dimension_binding": "#players_grid_dimension",
          "$grid_collection_name": "players_collection",
          "$grid_item_template": "host_options_dx.player_grid_item"
        }
      }
    ]
  },

  "player_button_content": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "size": [ "100%-4px", "100%-4px" ],
    "offset": [ 4, 0 ],
    "layer": 8,
    "controls": [
      { "player_pic_panel@host_options.player_pic_panel": { "size": [ 16, "100%" ] } },
      { "panel_0": { "type": "panel", "size": [ 2, "100%" ] } },
      {
        "player_gamertag@host_options.gamertag_wrapper": {
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "gamertag@pause_dx.player_gamertag": {
                "offset": [ 4, 0 ],
                "shadow": true,
                "color": "$text_color"
              }
            }
          ]
        }
      },
      { "panel_1": { "type": "panel", "size": [ 2, "100%" ] } },
      { "platform_icon@host_options.platform_icon_panel": {} }
    ]
  },

  "player_grid_item": {
    "type": "panel",
    "size": [ "100%", 22 ],
    "controls": [
      {
        "player_banner@chat_dx.black_button": {
          "anchor_from": "center",
          "anchor_to": "center",
          "size": [ "100%-2px", 20 ],
          "$glyph_size": [ "16px", "16px" ],
          "$button_text": "#gamertag",
          "$pressed_button_name": "button.sub_command",
          "$button_content": "host_options_dx.player_button_content",

          "bindings": [
            {
              "binding_name": "#gamertag",
              "binding_type": "collection",
              "binding_collection_name": "players_collection",
              "binding_name_override": "#sub_command"
            }
          ]
        }
      }
    ]
  },

  /*//// Teleport Buttons ////*/

  "host_teleport_grid_item": {
    "type": "panel",
    "size": [ "100%", 22 ],

    "controls": [
      {
        "host_option_toggle@common_toggles_dx.toggle_panel": {
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "size": [ "100%", 20 ],

          "$unchecked_control": "chat_dx.black_button_default",
          "$checked_control": "chat_dx.black_button_pressed",
          "$unchecked_hover_control": "chat_dx.black_button_hover",
          "$checked_hover_control": "chat_dx.black_button_hover",

          "$button_label_offset": [ 10, 0 ],
          "$button_content": "host_options_dx.button_content",

          "$button_glyph_anchor_from": "right_middle",
          "$button_glyph_anchor_to": "right_middle",
          "$button_content_offset_glyph": [ -10, 0 ],

          "$toggle_group_default_selected": 0,
          "$radio_toggle_group": true,
          "$toggle_name": "navigation_tab",

          "$button_text": "#button_text",
          "$button_text_binding_type": "collection",
          "$button_text_grid_collection_name": "$grid_collection_name",

          "$toggle_grid_collection_name": "$grid_collection_name",

          "$toggle_state_binding_name": "#toggle_selected",
          "$toggle_binding_type": "collection",

          "bindings": [
            {
              "binding_name": "#host_teleport_visible",
              "binding_name_override": "#visible",
              "binding_collection_name": "$grid_collection_name",
              "binding_type": "collection"
            }
          ]
        }
      },
      {
        "host_option_button@chat_dx.black_button": {
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "size": [ "100%", 20 ],
          "$button_text": "#tele_name",
          "$button_text_binding_type": "collection",
          "$button_text_grid_collection_name": "$grid_collection_name",
          "$pressed_button_name": "button.teleport_clear",
          "$button_glyph_texture": "textures/ui/arrowRight",
          "$glyph_size": [ 8, 8 ],
          "$button_content": "host_options_dx.button_content",

          "$button_glyph_anchor_from": "right_middle",
          "$button_glyph_anchor_to": "right_middle",
          "$button_content_offset_glyph": [ -10, 0 ],
          "$button_label_offset": [ 10, 0 ],

          "property_bag": {
            "#button_navigation": 0
          },
          "bindings": [
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#button_navigation",
              "binding_name_override": "#button_navigation"
            },
            {
              "binding_name": "(not #host_teleport_visible)",
              "binding_name_override": "#visible",
              "binding_collection_name": "$grid_collection_name",
              "binding_type": "collection"
            }
          ]
        }
      }
    ]
  },

  /*//// Main Buttons ////*/

  "host_menu_grid_item": {
    "type": "panel",
    "size": [ "100%", 22 ],
    "controls": [
      {
        "host_option_banner@chat_dx.black_button": {
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "size": [ "100%", 20 ],
          "$button_text": "#button_text",
          "$button_text_binding_type": "collection",
          "$button_text_grid_collection_name": "$grid_collection_name",
          "$pressed_button_name": "button.menu_navigation",
          "$button_content": "host_options_dx.button_content",
          "$button_glyph_anchor_from": "right_middle",
          "$button_glyph_anchor_to": "right_middle",
          "$button_content_offset_glyph": [ -10, 0 ],
          "$glyph_size": [ 8, 8 ],
          "$button_label_offset": [ 10, 0 ],
          "$button_glyph_visible_binding_type": "collection",
          "$button_glyph_visible_collection_name": "$grid_collection_name",
          "property_bag": {
            "#button_navigation": 0
          },
          "bindings": [
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#button_navigation",
              "binding_name_override": "#button_navigation"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#host_option_focus_id",
              "binding_name_override": "#focus_identifier"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#host_option_focus_override_left",
              "binding_name_override": "#focus_change_left"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#host_option_focus_override_right",
              "binding_name_override": "#focus_change_right"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#host_option_focus_override_up",
              "binding_name_override": "#focus_change_up"
            },
            {
              "binding_type": "collection",
              "binding_collection_name": "$grid_collection_name",
              "binding_name": "#host_option_focus_override_down",
              "binding_name_override": "#focus_change_down"
            }
          ]
        }
      }
    ]
  },

  /*//// Main Host Panel ////*/

  "host_panel": {
    "type": "panel",
    "size": [ 160, "100%-20px" ],
    "offset": [ 2, -14 ],
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "$offset_sub_tabs": [ "10%", 0 ],
    "$offset_second_sub_tabs": [ "110% + 3px", -2 ],
    "$bg_alpha": 0.75,
    "controls": [
      { 
        "host_main_panel@host_options.host_main_buttons": {
          "controls": [
            {
              "host_main_grid@host_options.host_grid": {
                "$grid_dimension_binding": "#host_main_grid_dimension",
                "$grid_collection_name": "host_main_collection",
                "$grid_item_template": "host_options_dx.host_menu_grid_item"
              }
            }
          ]
        }
      },
      { 
        "host_teleport_panel@host_options.host_teleport_buttons": {
          "controls": [
            {
              "return@host_options_dx.return_from_sub_command_button": {
                "$button_text": "hostOption.teleport"
              }
            },
            { "panel": { "type": "panel", "size": [ "100%", 2 ] } },
            {
              "sub_tab": {
                "type": "panel",
                "size": [ "100%", "100%c" ],
                "controls": [
                  {
                    "host_main_grid@host_options.host_grid": {
                      "offset": "$offset_sub_tabs",
                      "$grid_dimension_binding": "#host_teleport_grid_dimension",
                      "$grid_collection_name": "host_teleport_collection",
                      "$grid_item_template": "host_options_dx.host_teleport_grid_item"
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      { 
        "host_teleport_player_panel@host_options.host_teleport_player_buttons": {
          "controls": [
            {
              "toggle": {
                "type": "panel",
                "size": [ "100%", "90px" ],
                "controls": [
                  {
                    "bg@java_gui_common.text_input_java": {
                      "size": [ "100%", "100%" ],
                      "anchor_from": "bottom_left",
                      "anchor_to": "bottom_left",
                      "offset": "$offset_second_sub_tabs"
                    }
                  },
                  {
                    "host_time_panel@common_scroll_dx.scrolling_panel": {
                      "size": [ "100%", "100%" ],
                      "$scroll_size": [ 6, "100%" ],
                      "$scrolling_pane_size": [ "100%-4px", "100%-4px" ],
                      "$scroll_view_port_size": [ "100%-8px", "100%" ],
                      "$scrolling_pane_offset": [ 2, 2 ],
                      "anchor_from": "bottom_left",
                      "anchor_to": "bottom_left",
                      "$scroll_track_image_control": "common_menus_dx.java_scroll_track",
                      "$scroll_box_mouse_image_control": "common_menus_dx.java_scroll_box",
                      "$scroll_box_touch_image_control": "common_menus_dx.java_scroll_box",
                      "$scrolling_content": "host_options_dx.host_friends_tab",
                      "offset": "$offset_second_sub_tabs"
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      { 
        "host_time_panel@host_options.host_time_buttons": {
          "controls": [
            {
              "return@host_options_dx.return_from_sub_command_button": {
                "$button_text": "hostOption.time"
              }
            },
            { "panel_0": { "type": "panel", "size": [ "100%", 2 ] } },
            {
              "sub_tab": {
                "type": "panel",
                "size": [ "100%", "70px" ],
                "anchor_from": "bottom_left",
                "anchor_to": "bottom_left",
                "controls": [
                  { 
                    "scroll_bg@java_gui_common.text_input_java": {
                      "size": [ "100%", "100%" ],
                      "anchor_from": "bottom_left",
                      "anchor_to": "bottom_left",
                      "offset": "$offset_sub_tabs",
                      "controls": [
                        {
                          "scrolli_scrolli_ravioli@common_scroll_dx.scrolling_panel": {
                            "size": [ "100%", "100%" ],
                            "$scroll_size": [ 6, "100%" ],
                            "$scrolling_pane_size": [ "100%-4px", "100%-4px" ],
                            "$scroll_view_port_size": [ "100%-8px", "100%" ],
                            "$scrolling_pane_offset": [ 2, 2 ],
                            "anchor_from": "bottom_left",
                            "anchor_to": "bottom_left",
                            "$scroll_track_image_control": "common_menus_dx.java_scroll_track",
                            "$scroll_box_mouse_image_control": "common_menus_dx.java_scroll_box",
                            "$scroll_box_touch_image_control": "common_menus_dx.java_scroll_box",
                            "$scrolling_content": "host_options.host_grid",
                            "$grid_dimension_binding": "#host_time_grid_dimension",
                            "$grid_collection_name": "host_time_collection",
                            "$grid_item_template": "host_options_dx.host_sub_command_grid_item"
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            },
            { "panel_1": { "type": "panel", "size": [ "100%", 2 ] } }
          ]
        }
      },
      { 
        "host_weather_panel@host_options.host_weather_buttons": {
          "controls": [
            {
              "return@host_options_dx.return_from_sub_command_button": {
                "$button_text": "hostOption.weather"
              }
            },
            { "panel_0": { "type": "panel", "size": [ "100%", 2 ] } },
            {
              "sub_tab": {
                "type": "panel",
                "size": [ "100%", "100%c" ],
                "controls": [
                  { 
                    "scroll_bg@java_gui_common.text_input_java": {
                      "size": [ "100%", "100%c+4px" ],
                      "anchor_from": "bottom_left",
                      "anchor_to": "bottom_left",
                      "offset": "$offset_sub_tabs",
                      "controls": [
                        {
                          "host_main_grid@host_options.host_grid": {
                            "size": [ "100%-4px", "100%c" ],
                            "offset": [ 2, -2 ],
                            "anchor_from": "bottom_left",
                            "anchor_to": "bottom_left",
                            "$grid_dimension_binding": "#host_weather_grid_dimension",
                            "$grid_collection_name": "host_weather_collection",
                            "$grid_item_template": "host_options_dx.host_sub_command_grid_item"
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            },
            { "panel_1": { "type": "panel", "size": [ "100%", 2 ] } }
          ]
        }
      }
    ]
  }
}