Implemented picker

This commit is contained in:
Devine Lu Linvega
2018-03-07 13:50:41 +13:00
parent 813d26873e
commit 10b0b3e0ce
13 changed files with 155 additions and 17 deletions

View File

@@ -1,11 +1,13 @@
function Keyboard()
{
this.memory = "";
this.is_active = false;
this.selector = {x:0,y:0};
this.start = function()
{
this.is_active = true;
dotgrid.controller.set("keyboard");
this.select({x:10,y:10})
dotgrid.cursor.className = "keyboard";
@@ -13,6 +15,7 @@ function Keyboard()
this.stop = function()
{
this.is_active = false;
dotgrid.controller.set();
dotgrid.cursor.className = "";
}
@@ -75,6 +78,8 @@ function Keyboard()
this.listen = function(e)
{
if(!this.is_active){ return; }
if(e.key == "ArrowRight"){
dotgrid.keyboard.move(-1,0);
e.preventDefault();