Ejemplo n.º 1
0
 public UIInputBox(string text, string info, FontSet fonts, UIAnchor anchor, Func<float> width, Func<int> xOff, Func<int> yOff)
     : base(anchor, width, () => fonts.font_default.Height, xOff, yOff)
 {
     Text = text;
     Info = info;
     Fonts = fonts;
 }
Ejemplo n.º 2
0
 public UIButton(string buttontexname, string buttontext, FontSet font, Action clicked, UIAnchor anchor, Func<float> width, Func<float> height, Func<int> xOff, Func<int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
     tName = buttontexname;
     Text = buttontext;
     TextFont = font;
     ClickedTask = clicked;
 }
Ejemplo n.º 3
0
 public UIElement(UIAnchor anchor, Func<float> width, Func<float> height, Func<int> xOff, Func<int> yOff)
 {
     Children = new HashSet<UIElement>();
     Anchor = anchor != null ? anchor : UIAnchor.TOP_LEFT;
     Width = width != null ? width : () => 0;
     Height = height != null ? height : () => 0;
     OffsetX = xOff != null ? xOff : () => 0;
     OffsetY = yOff != null ? yOff : () => 0;
 }
Ejemplo n.º 4
0
 public UILabel(string btext, FontSet font, UIAnchor anchor, Func<int> xOff, Func<int> yOff, Func<int> maxx = null)
     : base(anchor, () => 0, () => 0, xOff, yOff)
 {
     Text = btext;
     TextFont = font;
     Width = () => (float)TextFont.MeasureFancyLinesOfText(MaxX != null ? TextFont.SplitAppropriately(Text, MaxX()) : Text, BColor).X;
     Height = () => (float)TextFont.MeasureFancyLinesOfText(MaxX != null ? TextFont.SplitAppropriately(Text, MaxX()) : Text, BColor).Y;
     MaxX = maxx;
 }
Ejemplo n.º 5
0
        public UITextLink(Texture ico, string btext, string btexthover, string btextclick, FontSet font, Action clicked, UIAnchor anchor, Func<int> xOff, Func<int> yOff)
            : base(anchor, () => 0, () => 0, xOff, yOff)
        {
            Icon = ico;
            ClickedTask = clicked;
            Text = btext;

            TextHover = btexthover;
            TextClick = btextclick;
            TextFont = font;
            Width = () => font.MeasureFancyText(Text, BColor) + (Icon == null ? 0 : font.font_default.Height);
            Height = () => TextFont.font_default.Height;
        }
Ejemplo n.º 6
0
 public UIGroup(UIAnchor anchor, Func <float> width, Func <float> height, Func <int> xOff, Func <int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
 }
Ejemplo n.º 7
0
 public UIScrollBox(UIAnchor anchor, Func<float> width, Func<float> height, Func<int> xOff, Func<int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
 }
Ejemplo n.º 8
0
        public UITextLink(Texture ico, string btext, string btexthover, string btextclick, FontSet font, Action clicked, UIAnchor anchor, Func <int> xOff, Func <int> yOff)
            : base(anchor, () => 0, () => 0, xOff, yOff)
        {
            Icon        = ico;
            ClickedTask = clicked;
            Text        = btext;

            TextHover = btexthover;
            TextClick = btextclick;
            TextFont  = font;
            Width     = () => font.MeasureFancyText(Text, BColor) + (Icon == null ? 0 : font.font_default.Height);
            Height    = () => TextFont.font_default.Height;
        }
Ejemplo n.º 9
0
 public UIButton(string buttontexname, string buttontext, FontSet font, Action clicked, UIAnchor anchor, Func <float> width, Func <float> height, Func <int> xOff, Func <int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
     tName       = buttontexname;
     Text        = buttontext;
     TextFont    = font;
     ClickedTask = clicked;
 }
Ejemplo n.º 10
0
 public UIColoredBox(Vector4 color, UIAnchor anchor, Func <float> width, Func <float> height, Func <int> xOff, Func <int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
     Color = color;
 }
Ejemplo n.º 11
0
 public UIImage(Texture image, UIAnchor anchor, Func<float> width, Func<float> height, Func<int> xOff, Func<int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
     Image = image;
 }
Ejemplo n.º 12
0
 public UIColoredBox(Vector4 color, UIAnchor anchor, Func<float> width, Func<float> height, Func<int> xOff, Func<int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
     Color = color;
 }
Ejemplo n.º 13
0
 public UIImage(Texture image, UIAnchor anchor, Func <float> width, Func <float> height, Func <int> xOff, Func <int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
     Image = image;
 }