Exemple #1
0
 public Button(string text, Texture2D background, Action onClick, MouseButton buttonToCheck)
 {
     this.background = new quad(background);
     t = new text(text);
     this.background.width  = t.tex.width;
     this.background.height = t.tex.height;
     this.onClick           = onClick;
     button = buttonToCheck;
     Game.buttonMan.Add(this);
 }
Exemple #2
0
 //DEBUG CONSTRUCTOR
 public Button(string text, Texture2D background, String toEcho, MouseButton buttonToCheck)
 {
     this.background = new quad(background);
     t = new text(text);
     this.background.width  = t.tex.width;
     this.background.height = t.tex.height;
     this.echo = toEcho;
     onClick   = Echo;
     button    = buttonToCheck;
     Game.buttonMan.Add(this);
 }