Ejemplo n.º 1
0
 public Button(string s, int x, int y, int w, int h, TCODColor fcol, TCODColor bcol, bool center, Action a)
 {
     this.Text = s;
     if (center)
         r = new Rect(x - w / 2, y, w, h);
     else
         r = new Rect(x, y, w, h);
     this.fcol = fcol;
     this.bcol = bcol;
     this.A = a;
 }
Ejemplo n.º 2
0
 public bool Intersects(Rect r)
 {
     return ((((r.X < (this.X + this.W)) && (this.X < (r.X + r.W))) && (r.Y < (this.Y + this.H))) && (this.Y < (r.Y + r.H)));
 }