예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #4
0
파일: UILabel.cs 프로젝트: Morphan1/Voxalia
 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;
 }
예제 #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;
        }
예제 #6
0
 public UIGroup(UIAnchor anchor, Func <float> width, Func <float> height, Func <int> xOff, Func <int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
 }
예제 #7
0
 public UIScrollBox(UIAnchor anchor, Func<float> width, Func<float> height, Func<int> xOff, Func<int> yOff)
     : base(anchor, width, height, xOff, yOff)
 {
 }
예제 #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;
        }
예제 #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;
 }
예제 #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;
 }
예제 #11
0
파일: UIImage.cs 프로젝트: Morphan1/Voxalia
 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;
 }
예제 #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;
 }
예제 #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;
 }