Added brush size triggers with brackets

This commit is contained in:
Devine Lu Linvega 2017-01-02 16:12:36 -07:00
parent 42bb3c3e80
commit 808ba43345
4 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,7 @@ canvas:hover { cursor: crosshair;}
#widget { color:#fff; position:absolute; font-size:10px; padding-top:10px;}
#widget .module { float:left; margin-right:10px; }
#widget .module .highlight { color:#e7fff8; }
#widget .cursor { float:right;}
#widget .cursor { float:right; text-align: right}
#commander { display:none; z-index: 2000; position:fixed; }
#commander.visible { display:block; }

View File

@ -18,6 +18,8 @@ function Keyboard()
case 13: this.key_enter(); break;
case 186: this.key_colon(); break;
case 27: this.key_escape(); break;
case 219: ronin.brush.size -= ronin.brush.size > 1 ? 1 : 0;ronin.widget.update(); break;
case 221: ronin.brush.size += 1;ronin.widget.update(); break;
}
// Passive

View File

@ -74,6 +74,10 @@ function Brush(rune)
return this.pointers.length > 0 ? "Brush "+this.size+", "+this.pointers.length+" pointers" : "No Pointers";
}
// Commands
// this.
// Cursor

View File

@ -20,8 +20,10 @@ function Pointer(offset = new Position(), color = new Color('000000'))
this.draw = function()
{
if(!this.position_prev){this.position_prev = this.position(); }
var position = this.position();
if(position.distance_to(this.position_prev) < 2){ return; } // Quickfix against stairs
this.distance += position.distance_to(this.position_prev);