Esempio n. 1
0
        public GDISpriteButton(Bitmap image, Bitmap hoverImage, PointF position, int tolenrece = 15, float scale = 1, AlignMethod align = AlignMethod.CENTER)
        {
            winHeight   = Engine.WinHeight;
            winWidth    = Engine.WinWidth;
            sprite      = new Sprite(image, position, tolenrece, scale, align);
            hoverSprite = new Sprite(hoverImage, position, tolenrece, scale, align);

            this.position = position;
            area          = new RectangleF(position.X - (image.Width * scale / 2), position.Y - (image.Height * scale / 2), image.Width * scale, image.Height * scale);

            left = new UIWidgetValue(metrics, position.X, winWidth);
            top  = new UIWidgetValue(metrics, position.Y, winHeight);
        }
Esempio n. 2
0
        public GDIStaticText(string text, string fontName, int fontSize, Brush brush, PointF position, bool neededAdjustWithFont, AlignMethod alignment = AlignMethod.CENTER)
        {
            winHeight                 = Engine.WinHeight;
            winWidth                  = Engine.WinWidth;
            font                      = new Font(fontName, fontSize);
            this.text                 = text;
            this.brush                = brush;
            this.position             = position;
            this.alignment            = alignment;
            this.neededAdjustWithFont = neededAdjustWithFont;

            left = new UIWidgetValue(metrics, position.X, winWidth);
            top  = new UIWidgetValue(metrics, position.Y, winHeight);
        }