public UILabel(int font, string text, RelativeRect rect, Color color, TextFittingModes mode = TextFittingModes.ByHeightExtend) : base(rect, color) { IgnoreMouse = true; FittingMode = mode; Text = text; Font = font; }
public UILabel(int font, string text, TextFittingModes mode = TextFittingModes.ByHeightExtend) : base() { IgnoreMouse = true; FittingMode = mode; Text = text; Font = font; DefaultMaterial.Color = Color.White; Rect = new RelativeRect(RelativeLoc.XCenter, RelativeLoc.YCenter, RelativeSize.FullWidth, RelativeSize.FullWidth, OriginLocation.Center); }
public UILabel(int font, string text, Color color, RelativePoint origin, RelativeSize height, RelativeSize width = null, OriginLocation anchor = OriginLocation.Center, TextFittingModes mode = TextFittingModes.ByHeightExtend) : base() { IgnoreMouse = true; FittingMode = mode; Text = text; Font = font; if (width == null) { width = RelativeSize.FullWidth; } DefaultMaterial.Color = color; Rect = new RelativeRect(origin.X, origin.Y, width, height, anchor); }
public void SetFittingMode(TextFittingModes mode) { FittingMode = mode; SetDirty(); }