Exemplo n.º 1
0
        public TextInfo(string _content, TextFontTypes _fontType, int _fontSize, Color _fontColor)
        {
            Content   = _content;
            fontType  = _fontType;
            FontSize  = _fontSize;
            FontColor = _fontColor;
            switch ((int)fontType)
            {
            case (int)TextFontTypes.Default:
                TextFont = Global.EngineFonts[0];
                break;

            case (int)TextFontTypes.Default2:
                TextFont = Global.EngineFonts[1];
                break;

            case (int)TextFontTypes.Arial:
                TextFont = Global.EngineFonts[2];
                break;

            case (int)TextFontTypes.Toon:
                TextFont = Global.EngineFonts[3];
                break;

            case (int)TextFontTypes.Vera:
                TextFont = Global.EngineFonts[4];
                break;

            case (int)TextFontTypes.Digital:
                TextFont = Global.EngineFonts[5];
                break;

            case (int)TextFontTypes.OpenSans:
                TextFont = Global.EngineFonts[6];
                break;
            }
        }
Exemplo n.º 2
0
 public Text(string _text, TextFontTypes _fontType, int _size = 25)
 {
     _fontSize = _size;
     _content  = _text;
     TextData  = new TextInfo(_content, _fontType, _size, Color.WHITE);
 }