public static SectionedText operator +(SectionedText thisText, IDrawableText other) { if (other is SectionedText) { var otherSectioned = (SectionedText)other; var arr = new IDrawableText[thisText.Sections.Length + otherSectioned.Sections.Length]; for (var i = 0; i < thisText.Sections.Length; i++) { arr[i] = thisText.Sections[i]; } for (var i = 0; i < otherSectioned.Sections.Length; i++) { arr[i + thisText.Sections.Length] = otherSectioned.Sections[i]; } return(new SectionedText(arr)); } var arr2 = new IDrawableText[thisText.Sections.Length + 1]; for (var i = 0; i < thisText.Sections.Length; i++) { arr2[i] = thisText.Sections[i]; } arr2[arr2.Length - 1] = other; return(new SectionedText(arr2)); }
public void ThreadSafeSetLine(int index, IDrawableText text) { lock (linesLock) { if (index == lines.Count) { lines.Add(text); } else { lines[index] = text; } } }
public static SectionedText operator +(PlainText thisText, IDrawableText other) { if (other is SectionedText) { var otherSectioned = (SectionedText)other; var arr = new IDrawableText[otherSectioned.Sections.Length]; arr[0] = thisText; for (var i = 0; i < otherSectioned.Sections.Length; i++) { arr[i + 1] = otherSectioned.Sections[i]; } return(new SectionedText(arr)); } return(new SectionedText(thisText, other)); }
public static void DrawText(IDrawableText text) { foreach (DrawableTextObject dto in text.TextObjects) DrawText(dto); }
public TextButton(IDrawableText text) : base(text.Text) { Text = text; }
public TextButton(string text) : base(text) { Text = new ColorText(text, Color.White); }
protected ColorOption(IDrawableText text) : base(text.Text) { DrawableText = text; }
public ColorOption(IDrawableText text, Utils.EventHandler function = null, Option[] subOptions = null, ColorOptGetter update = null) : base(text.Text, function, subOptions) { DrawableText = text; Updater = update; }