CopyFrom() public méthode

public CopyFrom ( TextFormat source ) : void
source TextFormat
Résultat void
Exemple #1
0
        public GTextField()
            : base()
        {
            _textFormat               = new TextFormat();
            _textFormat.font          = UIConfig.defaultFont;
            _textFormat.size          = 12;
            _textFormat.color         = Color.black;
            _textFormat.lineSpacing   = 3;
            _textFormat.letterSpacing = 0;

            TextFormat tf = _textField.textFormat;

            tf.CopyFrom(_textFormat);
            _textField.textFormat = tf;

            _text               = string.Empty;
            _autoSize           = AutoSizeType.Both;
            _widthAutoSize      = true;
            _heightAutoSize     = true;
            _textField.autoSize = true;
            _textField.wordWrap = false;

            gearColor = new GearColor(this);

            onFocusIn  = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged  = new EventListener(this, "onChanged");
        }
Exemple #2
0
        virtual protected void UpdateTextFormat()
        {
            if (_textFormat.font == null || _textFormat.font.Length == 0)
            {
                TextFormat tf = _textField.textFormat;
                tf.CopyFrom(_textFormat);
                tf.font = UIConfig.defaultFont;
                _textField.textFormat = tf;
            }
            else
            {
                TextFormat tf = _textField.textFormat;
                tf.CopyFrom(_textFormat);
                _textField.textFormat = _textFormat;
            }
            _textField.align       = _align;
            _textField.stroke      = _stroke;
            _textField.strokeColor = _strokeColor;
            _textField.singleLine  = _singleLine;

            if (!underConstruct)
            {
                UpdateSize();
            }
        }
Exemple #3
0
 static public int CopyFrom(IntPtr l)
 {
     try {
         FairyGUI.TextFormat self = (FairyGUI.TextFormat)checkSelf(l);
         FairyGUI.TextFormat a1;
         checkType(l, 2, out a1);
         self.CopyFrom(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int CopyFrom(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.TextFormat obj  = (FairyGUI.TextFormat)ToLua.CheckObject(L, 1, typeof(FairyGUI.TextFormat));
         FairyGUI.TextFormat arg0 = (FairyGUI.TextFormat)ToLua.CheckObject(L, 2, typeof(FairyGUI.TextFormat));
         obj.CopyFrom(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
        protected void UpdateTextFormat()
        {
            TextFormat tf = _textField.textFormat;

            tf.CopyFrom(_textFormat);
            if (_textFormat.font == null || _textFormat.font.Length == 0)
            {
                tf.font = UIConfig.defaultFont;
            }
            _textField.textFormat = tf;

            if (!underConstruct)
            {
                UpdateSize();
            }
        }
        public GTextField()
            : base()
        {
            _textFormat               = new TextFormat();
            _textFormat.font          = UIConfig.defaultFont;
            _textFormat.size          = 12;
            _textFormat.color         = Color.black;
            _textFormat.lineSpacing   = 3;
            _textFormat.letterSpacing = 0;

            TextFormat tf = _textField.textFormat;

            tf.CopyFrom(_textFormat);
            _textField.textFormat = tf;

            _text = string.Empty;
            _textField.autoSize = AutoSizeType.Both;
            _textField.wordWrap = false;
        }
        override protected void UpdateTextFormat()
        {
            if (_textFormat.font == null || _textFormat.font.Length == 0)
            {
                TextFormat tf = _richTextField.textFormat;
                tf.CopyFrom(_textFormat);
                tf.font = UIConfig.defaultFont;
                _richTextField.textFormat = tf;
            }
            else
            {
                TextFormat tf = _richTextField.textFormat;
                tf.CopyFrom(_textFormat);
                _richTextField.textFormat = tf;
            }

            if (!underConstruct)
            {
                UpdateSize();
            }
        }