Ejemplo n.º 1
0
        public void SetContentType(ETextFieldType type)
        {
            if (inputField != null)
            {
                InputField.ContentType contentType = InputField.ContentType.Standard;

                switch (type)
                {
                case ETextFieldType.String:
                    contentType = InputField.ContentType.Standard;
                    break;

                case ETextFieldType.Short:
                case ETextFieldType.Integer:
                    contentType = InputField.ContentType.IntegerNumber;
                    break;

                case ETextFieldType.Float:
                case ETextFieldType.Double:
                    contentType = InputField.ContentType.DecimalNumber;
                    break;
                }

                inputField.contentType = contentType;
            }
        }
Ejemplo n.º 2
0
 public TextFieldAttribute(ETextFieldType textFieldType, bool readOnly)
 {
     this.readOnly = readOnly;
 }
Ejemplo n.º 3
0
 public TextFieldAttribute(ETextFieldType textFieldType)
 {
     this.textFieldType = textFieldType;
 }
Ejemplo n.º 4
0
 public TextFieldAttribute()
 {
     textFieldType = ETextFieldType.String;
 }