From 0a8f42d0685825620f21496fedc7177013f61cee Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 6 Feb 2017 09:26:06 -0500 Subject: [PATCH] * --- scripts/core/init.js | 7 +++++-- scripts/core/keyboard.js | 12 ++++++++---- scripts/modules/module.js | 5 ++++- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/scripts/core/init.js b/scripts/core/init.js index 98fe934..0a7ff06 100644 --- a/scripts/core/init.js +++ b/scripts/core/init.js @@ -37,7 +37,10 @@ starting_canvas.height = parseInt(starting_canvas.height/40) * 40; commander.query("~ "+ronin.timestamp()); commander.query("@ "+starting_canvas.render()); commander.query("@ layer=Background"); -commander.query("@ #a1a1a1"); +commander.query("@ #222"); commander.query("@ layer=Main"); -commander.query("> 1 ; > 0,0 ; > 1,1 ; > #ffffff"); +commander.query("> 0,0"); +commander.query("> 1,1"); +commander.query("> 2,2"); +commander.query("> #ff0000"); commander.query("~ Ready."); \ No newline at end of file diff --git a/scripts/core/keyboard.js b/scripts/core/keyboard.js index 074f9f8..c84b2bd 100644 --- a/scripts/core/keyboard.js +++ b/scripts/core/keyboard.js @@ -26,7 +26,7 @@ function Keyboard() case "ArrowDown": this.key_arrow_down(); break; case "ArrowLeft": this.key_arrow_left(); break; case "ArrowRight": this.key_arrow_right(); break; - // case ":": this.key_colon(); break; + case ":": this.key_colon(); break; case "Escape": this.key_escape(); break; } @@ -39,6 +39,7 @@ function Keyboard() case 221: ronin.brush.size_down(); break; case 38: ronin.surface.layer_up(); break; case 40: ronin.surface.layer_down(); break; + case 8: this.key_delete(); break; } // Passive @@ -89,8 +90,11 @@ function Keyboard() { commander.hide(); - Object.keys(ronin.modules).forEach(function (key){ - ronin.modules[key].key_escape(); - }); + if(ronin.module){ ronin.module.key_escape(); } + } + + this.key_delete = function() + { + if(ronin.module){ ronin.module.key_delete(); } } } diff --git a/scripts/modules/module.js b/scripts/modules/module.js index 0bec166..6655926 100644 --- a/scripts/modules/module.js +++ b/scripts/modules/module.js @@ -98,7 +98,10 @@ function Module(rune) } this.key_escape = function() + { + } + + this.key_delete = function() { - } } \ No newline at end of file