thrungames

Elements

THRUNIUM offers easy to use HTML elements.

THRUNIUM.Elem.Button(text, x, y)

text String
x Number
y Number
return Element

Create a HTML button and place it on the canvas.

var game = new THRUNIUM.Game(400, 400);
game.init();
var button = THRUNIUM.Elem.Button('Press me!', 100, 100);
button.style.backgroundColor = "#000";
button.addEventListener('click', function(e) {
	// button was clicked
}, false);