don't set dirty on mousemove unless button is down.
This commit is contained in:
parent
9941dfa1fa
commit
4db6dd2c5f
8
cat.html
8
cat.html
|
@ -52,6 +52,8 @@ var curlevel = 1;
|
|||
var lastmx = -1, lastmy = -1;
|
||||
|
||||
|
||||
var mbdown = false;
|
||||
|
||||
|
||||
var FLASHSPEED = 0.05;
|
||||
|
||||
|
@ -3237,6 +3239,9 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
|||
handlemousedown : function(event) {
|
||||
var coords,adjustx,adjusty,realx,realy;
|
||||
event.preventDefault();
|
||||
|
||||
mbdown = true;
|
||||
|
||||
coords = getmousexy(event);
|
||||
adjustx = coords[0];
|
||||
adjusty = coords[1];
|
||||
|
@ -3413,6 +3418,7 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
|||
|
||||
event.preventDefault();
|
||||
|
||||
if (!mbdown) return;
|
||||
if (game.state != "running") return;
|
||||
|
||||
game.dirty = true; // need to redraw
|
||||
|
@ -3458,6 +3464,8 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
|||
|
||||
event.preventDefault();
|
||||
|
||||
mbdown = false;
|
||||
|
||||
if (game.state != "running") return;
|
||||
|
||||
game.dirty = true; // need to redraw
|
||||
|
|
Loading…
Reference in New Issue