Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public void SetFittingMode(TextFittingModes mode)
 {
     FittingMode = mode;
     SetDirty();
 }