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

{
  "namespace": "xbl_console_signin_succeeded",

  "banner_fill": {
    "type": "image",
    "texture": "textures/ui/Banners"
  },

  "gamer_score_icon": {
    "type": "image",
    "texture": "textures/ui/achievements_g",
    "size": [ 11, 11 ]
  },

  "profile_pic": {
    "type": "image",
    "size": [ 64, 64 ],
    "layer": 2,
    "bindings": [
      {
        "binding_name": "#texture_name",
        "binding_name_override": "#texture"
      },
      {
        "binding_name": "#texture_location_type",
        "binding_name_override": "#texture_file_system"
      }
    ]
  },

  "gamertag_label": {
    "type": "label",
    "size": [ "100%", "default" ],
    "text": "#gamertag",
    "layer": 2,
    "color": "$xbl_signin_text_color",
    "bindings": [
      {
        "binding_name": "#gamertag"
      }
    ]
  },

  "gamer_score_label": {
    "type": "label",
    "size": [ "default", "default" ],
    "text": "#gamer_score",
    "layer": 2,
    "color": "$xbl_signin_text_color",
    "bindings": [
      {
        "binding_name": "#gamer_score"
      }
    ]
  },

  "gamer_score_panel": {
    "type": "stack_panel",
    "size": [ "100%c", 11 ],
    "orientation": "horizontal",
    "controls": [
      {
        "gamer_score_icon@xbl_console_signin_succeeded.gamer_score_icon": {}
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ 2, "100%" ]
        }
      },
      {
        "gamer_score_panel": {
          "type": "panel",
          "size": [ "100%c", "100%c" ],
          "controls": [
            {
              "gamer_score@xbl_console_signin_succeeded.gamer_score_label": {
                "offset": [ 0, 1 ],
                "anchor_from": "top_left",
                "anchor_to": "top_left"
              }
            }
          ]
        }
      }
    ]
  },

  "button_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "controls": [
      {
        "play@common_buttons.light_text_button": {
          "size": [ "100%", 30 ],
          "layer": 1,
          "$pressed_button_name": "button.play",
          "$button_text": "xbox.signin.letsPlay",
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left"
        }
      }
    ]
  },

  "text_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "$text|default": "",
    "controls": [
      {
        "new_account_text": {
          "type": "label",
          "size": [ "100%", "default" ],
          "color": "$xbl_signin_text_color",
          "layer": 1,
          "text": "$text",
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left"
        }
      }
    ]
  },

  "third_party_platform_legal_text@text_panel": {
    "$text": "xbox.signin.legalinfo"
  },

  "new_account_text_panel@text_panel": {
    "$text": "xbox.signin.newaccount.info"
  },

  "gamer_profile_panel": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": [ "100%", 66 ],
    "controls": [
      {
        "picture_panel": {
          "type": "panel",
          "size": [ "100%c", "100%c" ],
          "controls": [
            {
              "banner@xbl_console_signin_succeeded.banner_fill": {
                "size": [ "100%c + 2px", "100%c + 2px" ],
                "controls": [
                  {
                    "profile_pic@xbl_console_signin_succeeded.profile_pic": {}
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ 4, "100%" ]
        }
      },
      {
        "info_panel": {
          "type": "panel",
          "size": [ "fill", "100%" ],
          "controls": [
            {
              "profile_info_panel": {
                "type": "stack_panel",
                "size": [ "100%", "100%c" ],
                "controls": [
                  {
                    "gamertag_label@xbl_console_signin_succeeded.gamertag_label": {}
                  },
                  {
                    "padding_0": {
                      "type": "panel",
                      "size": [ "100%", 2 ]
                    }
                  },
                  {
                    "gamer_score_panel@xbl_console_signin_succeeded.gamer_score_panel": {}
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },

  "main_panel": {
    "type": "stack_panel",
    "size": [ "100% - 4px", "100%c - 1px" ],
    "controls": [
      {
        "profile@xbl_console_signin_succeeded.gamer_profile_panel": {}
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 2 ]
        }
      },
      {
        "third_party_legal_text_panel@xbl_console_signin_succeeded.third_party_platform_legal_text": {
          "ignored": "(not $nx_os and not $is_ps4)"
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": [ "100%", 5 ],
          "ignored": "(not $nx_os and not $is_ps4)"
        }
      },
      {
        "new_account_text_panel@xbl_console_signin_succeeded.new_account_text_panel": {
          "ignored": "($nx_os or $is_ps4",
          "bindings": [
            {
              "binding_name": "#is_new_account",
              "binding_name_override": "#visible",
              "binding_type": "global"
            }
          ]
        }
      },
      {
        "padding_2": {
          "ignored": "($nx_os or $is_ps4)",
          "type": "panel",
          "size": [ "100%", 5 ],
          "bindings": [
            {
              "binding_name": "#is_new_account",
              "binding_name_override": "#visible",
              "binding_type": "global"
            }
          ]
        }
      },
      {
        "button_panel@xbl_console_signin_succeeded.button_panel": {}
      }
    ]
  },

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

  "xbl_console_signin_succeeded_screen_content": {
    "type": "panel",
    "controls": [
      {
        "dialog@xbl_console_signin_succeeded.dialog": {
          "layer": 1
        }
      }
    ]
  },

  "dialog@common_dialogs.form_fitting_main_panel_no_buttons": {
    "size": "$xbl_console_signin_succeeded_screen_size",
    "$child_control": "xbl_console_signin_succeeded.main_panel",
    "$text_name": "#welcome_message",
    "$title_text_binding_type": "global",
    "$show_close_button": false
  }
}