Example #1
0
 public InputFieldConfiguration()
 {
     Active      = true;
     Placeholder = "";
     InputType   = "text";
     LabelClass  = "col-md-3";
     InputClass  = "col-md-9";
     Validation  = null; // new List<InputFieldValidation>();
 }
    void Start()
    {
        if (!RemoveIfNeeded())
        {
            return;
        }

        registerErrorLabel.text = "";
        registerTab.SetActive(false);
        confirmationTab.SetActive(false);

        loginUserEmailValidator    = loginUserEmail.GetComponent <InputFieldValidation>();
        loginUserPasswordValidator = loginUserPassword.GetComponent <InputFieldValidation>();

        registerUserEmailValidator           = registerUserEmail.GetComponent <InputFieldValidation>();
        registerUserPasswordValidator        = registerUserPassword.GetComponent <InputFieldValidation>();;
        registerUserPasswordConfirmValidator = registerUserPasswordConfirm.GetComponent <InputFieldValidation>();
        resendVerificationTextObject.SetActive(false);
        if (!string.IsNullOrEmpty(PlayerPrefs.GetString("SocialPlay_Login_UserEmail")))
        {
            loginUserEmail.text = PlayerPrefs.GetString("SocialPlay_Login_UserEmail");
        }
        else
        {
            loginUserEmail.text = "";
        }

        if (!string.IsNullOrEmpty(PlayerPrefs.GetString("SocialPlay_UserGuid")))
        {
            CloudGoodsUser userInfo = new CloudGoodsUser(PlayerPrefs.GetString("SocialPlay_UserGuid"), PlayerPrefs.GetString("SocialPlay_UserName"), PlayerPrefs.GetString("SocialPlay_UserEmail"));

            CloudGoods.AuthorizeUser(userInfo);

            RecivedUserGuid(userInfo);
        }
    }
        /**
         * Helper za dodavanje konfiguracije
         */
        private void AddConfiguration(string field, InputFieldConfiguration configuration, InputFieldValidation validation = null)
        {
            if (validation != null)
            {
                configuration.Validation = validation;
            }

            Configuration.Add(new KeyValuePair <string, InputFieldConfiguration>(field, configuration));
        }