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

{
  "namespace": "xbl_first_launch",


  "Xbox_icon": {
    "type": "image",
    "texture": "textures/ui/xbox4",
    "layer": 3,
    "size": [ 20, 20 ]
  },

  "button_label": {
    "type": "label",
    "size": [ "100%-30px", "default" ],
    "offset": [ -2, 0 ],
    "anchor_from": "right_middle",
    "anchor_to": "right_middle",
    "text": "xbox.signinFree",
    "color": "$text_color"
  },

  "xbl_signin_label": {
    "type": "panel",
    "layer": 2,    
    "controls": [
      {
        "Xbox_icon@Xbox_icon": {
          "ignored": "($hide_xbox_live_icon)",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "offset": [6, 0]
        }
      },
      {
        "button_label@xbl_first_launch.button_label": {
          "ignored": "($hide_xbox_live_icon)"
        }
      },
      {
        "nx_button_label@xbl_first_launch.button_label": {
          "ignored": "(not $hide_xbox_live_icon)",
          "size": [ "100%", "default" ],
          "offset": [ 6, 0 ]
        }
      }
    ]
  },

  "xbl_signin_button@common_buttons.light_content_button": {
    "$pressed_button_name": "button.xbl_signin",
    "$button_content": "xbl_first_launch.xbl_signin_label"
  },

  "title_image_panel": {
    "type": "panel",    
    "controls": [
      {
        "message_label": {
          "type": "label",
          "size": [ "100%-93px", "100% - 3px" ],
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "offset": [ -45, 1 ],
          "text": "#message",
          "layer": 2,
          "color": "$body_text_color",
          "bindings": [
            {
              "binding_name": "#message"
            }
          ]
        }
      },
      {
        "title_image": {
          "type": "image",
          "layer": 1,
          "anchor_from": "top_right",
          "anchor_to": "top_right",
          "texture": "textures/ui/train",
          "offset": [ -2, 1 ],
          "size": [ 82, 75 ]
        }
      },
      {
        "a@xbl_signin_button": {
          "size": [ 82, 35 ],
          "anchor_from": "bottom_right",
          "anchor_to": "bottom_right",
          "offset": [ -2,-2 ]
        }
      }
    ]
  },

  "main_panel": {
    "type": "input_panel",
    "size": "$xbl_first_launch_screen_size",
    "offset": [0, "15%"],
    "controls": [
      {
        "common_panel@common.common_panel": {
          "$dialog_background": "dialog_background_hollow_3",
          "$show_divider": true,
          "$divider_offset": [ "100%-98px", "22px" ]
        }
      },
      {
        "title_label": {
          "type": "label",
          "offset": [ 0, 8 ],
          "text": "xblLogin.LoginMessageTitle",
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "layer": 2,
          "color": "$title_text_color"
        }
      },
      {
        "myimage@title_image_panel": {
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "size": [ "100%-16px", "100%-31px" ],
          "offset": [ 8, 23 ]
        }
      }
    ]
  },

  "gamepad_helpers": {
    "type": "panel",
    "layer": 2,
    "controls": [
      {
        "gamepad_helper_a@common.gamepad_helper_a": {
          "anchor_from": "bottom_right",
          "anchor_to": "bottom_right"
        }
      }
    ]
  },

  // -----------------------------------------------
  //
  //    screen
  //
  // -----------------------------------------------
  "xbl_first_launch_screen@common.base_screen": {
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
      }
    ],
    "$screen_content": "xbl_first_launch.xbl_first_launch_screen_content"
  },

  "xbl_first_launch_screen_content": {
    "type": "panel",
    "controls": [
      {
        "title_panel_content@common_art.title_panel_content": { }
      },
      {
        "root_panel": {
          "type": "panel",
          "controls": [
            { "gamepad_helpers@gamepad_helpers": { } },
            { "main_panel@main_panel": { "layer": 1 } }
          ]
        }
      }
    ]
  }
}