Exemplo n.º 1
0
 public Button(string text, Texture2D background, Action onClick, MouseButton buttonToCheck, StateMachines.iState state)
 {
     this.background = new quad(background);
     this.background.doDistCulling = false;
     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);
     containingState = state;
 }
Exemplo n.º 2
0
        public Button(int size, string text, Texture2D background, String toEcho, MouseButton buttonToCheck, StateMachines.iState state)
        {
            this.background = new quad(background);
            this.background.doDistCulling = false;
            t = new text(text);
            this.background.width  = size;
            this.background.height = size;

            this.echo = toEcho;
            onClick   = Echo;
            button    = buttonToCheck;
            Game.buttonMan.Add(this);
            containingState = state;
        }