1 decade ago by Mario
hi, i want to scale up my game with the html canvas scale function
but the mouse check fails
i think i have to scale up the mice coordinates but it doesnt work yet...
demo: cote.dragonfly-game.de
but the mouse check fails
inFocus: function() {
var m = { x: ig.input.mouse.x, y: ig.input.mouse.y };
var s = { x: ig.game.screen.x, y: ig.game.screen.y };
var p = { x: this.pos.x, y: this.pos.y };
var z = { x: this.size.x, y: this.size.y };
return (
(p.x <= (m.x + s.x)) &&
((m.x + s.x) <= p.x + z.x) &&
(p.y <= (m.y + s.y)) &&
((m.y + s.y) <= p.y + z.y)
);
},
i think i have to scale up the mice coordinates but it doesnt work yet...
demo: cote.dragonfly-game.de
