Skip to content

Commit

Permalink
fixes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
increpare committed Jun 11, 2019
1 parent 5d7e3bd commit f124ae2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion help.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ <h2>editor</h2>
<b>C</b> : copy current image<br>
<b>V</b> : paste current image<br>
<b>Z</b> : undo<br>
<b>+</b>/<b>-</b> : increase/decrease brush size
<b>+</b>/<b>-</b> : increase/decrease brush size<br>
<b>Right-Click</b> or <b>Ctrl/Cmd</b>+<b>Click</b> : select current color (eyedropper tool)
<p>
<h2>player</h2>
<b>F</b> : go fullscreen
Expand Down
18 changes: 16 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,9 @@
if(radius===0){
drawing=0;
}

e.preventDefault();
return !1;
}

function mouseUp(e){
Expand Down Expand Up @@ -786,7 +789,18 @@

var x = Math.floor(coords[0]/zoomFactor);
var y = Math.floor(coords[1]/zoomFactor);

console.log(`button = ${e.button}`);
if (e.metaKey||e.altKey||e.shiftKey||e.ctrlKey||e.button>0){

var pIndex = x+width*y;
var canvas=canvasses[canvasIndex];
var newColorIndex = canvas[pIndex];

// console.log(` x = ${x}; y = ${y}; pIndex = ${pIndex}; newColorIndex = ${newColorIndex}`);
setColor(newColorIndex);
e.preventDefault();
return false;
}

var canvas=canvasses[canvasIndex];

Expand Down Expand Up @@ -1109,7 +1123,7 @@
<center>
<input width="640" style="border:2px solid gray;" onkeydown="event.stopPropagation();" value="www.flickgame.org" id="linkInput" oninput="linkChange(this.value)" />
<br/>
<canvas id="mainCanvas" width="640" height="400" style="border:2px solid gray; background-color:black;"></canvas>
<canvas id="mainCanvas" oncontextmenu="return false;" width="640" height="400" style="border:2px solid gray; background-color:black;"></canvas>
<br />
<table style="border:2px solid gray; margin-top:2px" margin="0">
<tr height="16">
Expand Down

0 comments on commit f124ae2

Please sign in to comment.