aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/data/tools-data.js6
-rwxr-xr-xjs/mediators/keyboard-mediator.js18
2 files changed, 21 insertions, 3 deletions
diff --git a/js/data/tools-data.js b/js/data/tools-data.js
index faf3336f..4d009530 100755
--- a/js/data/tools-data.js
+++ b/js/data/tools-data.js
@@ -151,7 +151,7 @@ exports.ToolsData = Montage.create(Montage, {
151 "properties": "fillProperties", 151 "properties": "fillProperties",
152 "spriteSheet": true, 152 "spriteSheet": true,
153 "action": "FillTool", 153 "action": "FillTool",
154 "toolTip": "Fill Tool", 154 "toolTip": "Paint Bucket Tool (K)",
155 "cursor": "url('images/tools/bucket_down.png'), default", 155 "cursor": "url('images/tools/bucket_down.png'), default",
156 "lastInGroup": false, 156 "lastInGroup": false,
157 "container": false, 157 "container": false,
@@ -162,7 +162,7 @@ exports.ToolsData = Montage.create(Montage, {
162 "properties": "inkbottleProperties", 162 "properties": "inkbottleProperties",
163 "spriteSheet": true, 163 "spriteSheet": true,
164 "action": "InkBottleTool", 164 "action": "InkBottleTool",
165 "toolTip": "Ink Bottle Tool", 165 "toolTip": "Ink Bottle Tool (K)",
166 "cursor": "url('images/tools/inkbottle_down.png'), default", 166 "cursor": "url('images/tools/inkbottle_down.png'), default",
167 "lastInGroup": true, 167 "lastInGroup": true,
168 "container": false, 168 "container": false,
@@ -173,7 +173,7 @@ exports.ToolsData = Montage.create(Montage, {
173 "properties": "eyedropperProperties", 173 "properties": "eyedropperProperties",
174 "spriteSheet": true, 174 "spriteSheet": true,
175 "action": "EyedropperTool", 175 "action": "EyedropperTool",
176 "toolTip": "Eyedropper Tool", 176 "toolTip": "Eyedropper Tool (I)",
177 "cursor": "url('images/tools/eyedropper_down.png') 6 20, default", 177 "cursor": "url('images/tools/eyedropper_down.png') 6 20, default",
178 "lastInGroup": false, 178 "lastInGroup": false,
179 "container": false, 179 "container": false,
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index 82596693..79967799 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -168,6 +168,24 @@ exports.KeyboardMediator = Montage.create(Component, {
168 return; 168 return;
169 } 169 }
170 170
171 // Paint Bucket Tool and Ink Bottle tools share keyboard shortcut K
172 if(evt.keyCode === Keyboard.K ) {
173 evt.preventDefault();
174 if(this.application.ninja.toolsData.selectedTool.id === "FillTool") {
175 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[11]});
176 } else {
177 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[10]});
178 }
179 return;
180 }
181
182 // Shortcut for Eyedropper Tool is I
183 if(evt.keyCode === Keyboard.I ) {
184 evt.preventDefault();
185 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[12]});
186 return;
187 }
188
171 // Rotate Stage Tool is M 189 // Rotate Stage Tool is M
172 if(evt.keyCode === Keyboard.M ) { 190 if(evt.keyCode === Keyboard.M ) {
173 evt.preventDefault(); 191 evt.preventDefault();