Пример #1
0
 public DxWindow(string title, float x, float y, float width, float height, bool relative = false, Color color = null, DxElement parent = null)
     : base(x, y, width, height, relative, color, parent)
 {
     this.title       = title;
     this.colorHeader = new Color((int)(200 * 1.1f), 0, 0, 0);
     this.colorTitle  = new Color(255, 255, 255, 255);
 }
Пример #2
0
 public DxButton(float x, float y, float width, float height, bool relative = false, Color color = null, DxElement parent = null)
     : base(x, y, width, height, relative, color, parent)
 {
     this.hoverColor = new Color(this.color.a, 255, 0, 0);
     this.clickColor = new Color(this.color.a, 0, 0, 255);
 }
Пример #3
0
        protected DxElement(float x, float y, float width, float height, bool relative = false, Color color = null, DxElement parent = null)
        {
            this.id       = lastInt++;
            this.x        = x;
            this.y        = y;
            this.width    = width;
            this.height   = height;
            this.relative = relative;

            this.color  = color ?? new Color(200, 0, 0, 0);
            this.parent = parent;

            Elements.Add(this.id, this);
        }