ACAT.Lib.Core.TalkWindowManagement.TalkWindowBase.setFont C# (CSharp) Méthode

setFont() protected méthode

Changes the size of the font in the talk window
protected setFont ( float size ) : bool
size float size of the font
Résultat bool
        protected virtual bool setFont(float size)
        {
            if (size == 0.0f)
            {
                size = defaultFontSize;
            }

            if (size >= MinFontSize && size <= MaxFontSize)
            {
                var font = TalkWindowTextBox.Font;

                var newFont = new Font(font.FontFamily, size, font.Style);
                TalkWindowTextBox.Font = newFont;

                FontSize = size;

                return true;
            }

            return false;
        }