In order that the button will work, you have to bind the needed key. The default name of the action is click. In your game init write this:
ig.input.bind( ig.KEY.MOUSE1, 'click' );
Can render Text. Just specify your ig.Font when spawning the button or set ig.game.buttonFont Specify the animSheet, otherwise you won't see the button. If you need the different states, your animSheet must contain all three of them. Left is idle, middle is active and right is deactive
To see something override the drawing method or specify an animSheet. If you just want to test this class you can use this image:
Has 4 States:
- hidden - Not shown
- idle - just sitting there
- active - someone is pushing on it
- deactive - shown, but not usable
And 3 Events
- pressedDown - activated when pressed Down
- pressed - constantly fires when pressing
- pressedUp - activated when button released
Use like you want to, just don't blame me for anything.