public void Initialize(TextboxController textboxController, TextSpeed textSpeed, int linesPerTextbox) { this.textboxController = textboxController; if (font == null) { LoadDefaultFont(); } this.linesPerTextbox = linesPerTextbox; this.textSpeed = textSpeed; if (fontScaler == null) { fontScaler = new AutoFontScaler(); } if (autoFontSize) { SetAutoFontSize(); } SetHigherSpeed(); }
/// <summary> /// Automatically calculates the font size, so that it's just as big (or small) as it needs to be to fill the /// textbox with a given number of lines at a time. /// </summary> public void SetAutoFontSize() { if (fontScaler == null) { fontScaler = new AutoFontScaler(); } fontSize = fontScaler.ScaleFontSizeToText(textboxText, font, linesPerTextbox); }
public void Initialize(TextboxController tbText) { this.textboxController = tbText; if (font == null) { LoadDefaultFont(); } SetHigherSpeed(); if (fontScaler == null) { fontScaler = new AutoFontScaler(); } if (autoFontSize) { SetAutoFontSize(); } }