// Token: 0x06000989 RID: 2441 RVA: 0x0003BF2C File Offset: 0x0003A12C
 public void Draw(Rect rect)
 {
     GUI.Label(new Rect(8f, rect.y + 1f, 160f, 14f), this.Date, BlueStonez.label_interparkmed_11pt_left);
     if (this.View.Priority == 0)
     {
         GUI.color = Color.red;
     }
     GUI.Label(new Rect(80f, rect.y, this.Length, 14f), this.View.Description, BlueStonez.label_interparkbold_11pt_left);
     GUI.color        = Color.white;
     GUI.contentColor = ((this.View.Priority != 0) ? ColorScheme.UberStrikeYellow : Color.red);
     if (!string.IsNullOrEmpty(this.View.Url) && GUITools.Button(new Rect(90f + this.Length, rect.y, 78f, 16f), new GUIContent(LocalizedStrings.MoreInfo, LocalizedStrings.OpenThisLinkInANewBrowserWindow), BlueStonez.buttondark_medium))
     {
         ScreenResolutionManager.IsFullScreen = false;
         ApplicationDataManager.OpenUrl(this.View.Description, this.View.Url);
     }
     GUI.contentColor = Color.white;
 }
 // Token: 0x06000D00 RID: 3328 RVA: 0x000597CC File Offset: 0x000579CC
 private void DrawLoginPanel()
 {
     GUI.BeginGroup(this._rect, GUIContent.none, BlueStonez.window);
     GUI.depth = 3;
     GUI.Label(new Rect(0f, 0f, this._rect.width, 23f), "Add an existing UberStrike Account to Steam", BlueStonez.tab_strip);
     GUI.Label(new Rect(0f, 48f, this._rect.width - 10f, 48f), "Your UberStrike account will be permanently associated with your Steam account", BlueStonez.label_interparkbold_11pt);
     GUI.Label(new Rect(20f, 108f, 100f, 24f), "Email:");
     this._emailAddress = GUI.TextField(new Rect(128f, 108f, this._rect.width - 164f, 24f), this._emailAddress, 100, BlueStonez.textField);
     if (string.IsNullOrEmpty(this._emailAddress))
     {
         GUI.color = Color.white.SetAlpha(0.3f);
         GUI.color = Color.white;
     }
     GUI.Label(new Rect(20f, 144f, 100f, 24f), "Password:"******"Cancel"), BlueStonez.buttondark_medium))
     {
         this.Hide();
         Singleton <AuthenticationManager> .Instance.LoginByChannel();
     }
     if (GUITools.Button(new Rect(210f, 190f, 100f, 52f), new GUIContent("Add"), BlueStonez.button_green))
     {
         this.HideKeyboard();
         this.Login(this._emailAddress, this._password);
     }
     GUI.Label(new Rect(8f, 256f, this._rect.width - 16f, 8f), GUIContent.none, BlueStonez.horizontal_line_grey95);
     if (GUITools.Button(new Rect(20f, 264f, 100f, 40f), new GUIContent("Forgot password?"), BlueStonez.label_interparkbold_11pt_url))
     {
         this.HideKeyboard();
         ApplicationDataManager.OpenUrl(string.Empty, "http://www.uberstrike.com/#forgot_password");
     }
     if (GUITools.Button(new Rect(this._rect.width - 118f, 264f, 98f, 40f), new GUIContent("Facebook player?"), BlueStonez.label_interparkbold_11pt_url))
     {
         this.HideKeyboard();
         ApplicationDataManager.OpenUrl(string.Empty, "http://www.uberstrike.com/steam");
     }
     GUI.enabled = true;
     GUI.EndGroup();
 }
Beispiel #3
0
 // Token: 0x06000F5E RID: 3934 RVA: 0x0000AF56 File Offset: 0x00009156
 private void OpenAndroidAppStoreUpdatesPage()
 {
     ApplicationDataManager.OpenUrl(string.Empty, "market://details?id=com.cmune.uberstrike.android");
 }
Beispiel #4
0
 // Token: 0x06000F5D RID: 3933 RVA: 0x0000AF45 File Offset: 0x00009145
 private void OpenIosAppStoreUpdatesPage()
 {
     ApplicationDataManager.OpenUrl(string.Empty, "itms-apps://itunes.com/apps/uberstrike");
 }
    // Token: 0x06000D66 RID: 3430 RVA: 0x0005D9FC File Offset: 0x0005BBFC
    private void OnGUI()
    {
        if (Mathf.Abs(this._keyboardOffset - this._targetKeyboardOffset) > 2f)
        {
            this._keyboardOffset = Mathf.Lerp(this._keyboardOffset, this._targetKeyboardOffset, Time.deltaTime * 4f);
        }
        else
        {
            this._keyboardOffset = this._targetKeyboardOffset;
        }
        Rect position = new Rect((float)(Screen.width - 500) * 0.5f, ((float)Screen.height - this._height) * 0.5f - this._keyboardOffset, 500f, this._height);

        GUI.BeginGroup(position, GUIContent.none, BlueStonez.window);
        GUI.Label(new Rect(0f, 0f, position.width, 56f), LocalizedStrings.Welcome, BlueStonez.tab_strip);
        Rect position2 = new Rect(20f, 55f, position.width - 40f, position.height - 78f);

        GUI.Label(position2, GUIContent.none, BlueStonez.window_standard_grey38);
        GUI.BeginGroup(position2);
        GUI.Label(new Rect(0f, 0f, position2.width, 60f), LocalizedStrings.PleaseProvideValidEmailPasswordMsg, BlueStonez.label_interparkbold_18pt);
        GUI.Label(new Rect(0f, 76f, 170f, 11f), LocalizedStrings.Email, BlueStonez.label_interparkbold_11pt_right);
        GUI.Label(new Rect(0f, 110f, 170f, 11f), LocalizedStrings.Password, BlueStonez.label_interparkbold_11pt_right);
        GUI.Label(new Rect(0f, 147f, 170f, 11f), LocalizedStrings.VerifyPassword, BlueStonez.label_interparkbold_11pt_right);
        GUI.enabled = this._enableGUI;
        GUI.SetNextControlName("@Email");
        this._emailAddress = GUI.TextField(new Rect(180f, 69f, 180f, 22f), this._emailAddress, BlueStonez.textField);
        if (string.IsNullOrEmpty(this._emailAddress) && GUI.GetNameOfFocusedControl() != "@Email")
        {
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Label(new Rect(188f, 75f, 180f, 22f), LocalizedStrings.EnterYourEmailAddress, BlueStonez.label_interparkmed_11pt_left);
            GUI.color = Color.white;
        }
        GUI.SetNextControlName("@Password1");
        this._password1 = GUI.PasswordField(new Rect(180f, 104f, 180f, 22f), this._password1, '*', BlueStonez.textField);
        if (string.IsNullOrEmpty(this._password1) && GUI.GetNameOfFocusedControl() != "@Password1")
        {
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Label(new Rect(188f, 110f, 172f, 18f), LocalizedStrings.EnterYourPassword, BlueStonez.label_interparkmed_11pt_left);
            GUI.color = Color.white;
        }
        GUI.SetNextControlName("@Password2");
        this._password2 = GUI.PasswordField(new Rect(180f, 140f, 180f, 22f), this._password2, '*', BlueStonez.textField);
        if (string.IsNullOrEmpty(this._password2) && GUI.GetNameOfFocusedControl() != "@Password2")
        {
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Label(new Rect(188f, 146f, 180f, 22f), LocalizedStrings.RetypeYourPassword, BlueStonez.label_interparkmed_11pt_left);
            GUI.color = Color.white;
        }
        GUI.enabled      = true;
        GUI.contentColor = this._errorMessageColor;
        GUI.Label(new Rect(0f, 175f, position2.width, 40f), this._errorMessage, BlueStonez.label_interparkbold_11pt);
        GUI.contentColor = Color.white;
        GUI.EndGroup();
        GUI.Label(new Rect(100f, position.height - 42f - 22f, 300f, 16f), "By clicking OK you agree to the", BlueStonez.label_interparkbold_11pt);
        if (GUI.Button(new Rect(185f, position.height - 30f - 12f, 130f, 20f), "Terms of Service", BlueStonez.buttondark_small))
        {
            ApplicationDataManager.OpenUrl("Terms Of Service", "http://www.cmune.com/index.php/terms-of-service/");
            this.HideKeyboard();
        }
        GUI.Label(new Rect(207f, position.height - 15f - 22f, 90f, 20f), GUIContent.none, BlueStonez.horizontal_line_grey95);
        GUI.enabled = this._enableGUI;
        if (GUITools.Button(new Rect(position.width - 150f, position.height - 42f - 22f, 120f, 32f), new GUIContent(LocalizedStrings.OkCaps), BlueStonez.button_green))
        {
            this.HideKeyboard();
            if (!ValidationUtilities.IsValidEmailAddress(this._emailAddress))
            {
                this._targetHeight      = 340f;
                this._errorMessageColor = Color.red;
                this._errorMessage      = LocalizedStrings.EmailAddressIsInvalid;
            }
            else if (this._password1 != this._password2)
            {
                this._targetHeight      = 340f;
                this._errorMessageColor = Color.red;
                this._errorMessage      = LocalizedStrings.PasswordDoNotMatch;
            }
            else if (!ValidationUtilities.IsValidPassword(this._password1))
            {
                this._targetHeight      = 340f;
                this._errorMessageColor = Color.red;
                this._errorMessage      = LocalizedStrings.PasswordInvalidCharsMsg;
            }
            else
            {
                this._enableGUI         = false;
                this._targetHeight      = 340f;
                this._errorMessageColor = Color.grey;
                this._errorMessage      = LocalizedStrings.PleaseWait;
                AuthenticationWebServiceClient.CreateUser(this._emailAddress, this._password1, ApplicationDataManager.Channel, ApplicationDataManager.CurrentLocale.ToString(), SystemInfo.deviceUniqueIdentifier, delegate(MemberRegistrationResult result)
                {
                    if (result == MemberRegistrationResult.Ok)
                    {
                        this.Hide();
                        CmunePrefs.WriteKey <string>(CmunePrefs.Key.Player_Email, this._emailAddress);
                        CmunePrefs.WriteKey <string>(CmunePrefs.Key.Player_Password, this._password1);
                        UnityRuntime.StartRoutine(Singleton <AuthenticationManager> .Instance.StartLoginMemberEmail(this._emailAddress, this._password1));
                        this._targetHeight      = 300f;
                        this._errorMessage      = string.Empty;
                        this._emailAddress      = string.Empty;
                        this._password1         = string.Empty;
                        this._password2         = string.Empty;
                        this._errorMessageColor = Color.red;
                        this._enableGUI         = true;
                    }
                    else
                    {
                        this._enableGUI         = true;
                        this._targetHeight      = 340f;
                        this._errorMessageColor = Color.red;
                        this._errorMessages.TryGetValue(result, out this._errorMessage);
                    }
                }, delegate(Exception ex)
                {
                    this._enableGUI    = true;
                    this._targetHeight = 300f;
                    this._errorMessage = string.Empty;
                    this.ShowSignUpErrorPopup(LocalizedStrings.Error, "Sign Up was unsuccessful. There was an error communicating with the server.");
                });
            }
        }
        if (GUITools.Button(new Rect(30f, position.height - 42f - 22f, 120f, 32f), new GUIContent(LocalizedStrings.BackCaps), BlueStonez.button))
        {
            this.Hide();
            this.HideKeyboard();
            PanelManager.Instance.OpenPanel(PanelType.Login);
        }
        GUI.enabled = true;
        GUI.EndGroup();
    }