Этот коммит содержится в:
Hugh Bord 2021-12-06 17:00:11 +10:00
родитель f1cf2d295a
Коммит 87653aefe9
2 изменённых файлов: 24 добавлений и 20 удалений

Просмотреть файл

@ -70,16 +70,8 @@ ASCIIBIRD is mostly usable. There are some bugs however to note at the moment. R
* Having more than a few layers depending on ascii size will slow things down, until the `fillNullBlocks` is refactored.
* CHUNKED DIFF ENGINE
* Redo ctrl Y is COOKED (not working) - redo the undo and redo with this new system
* If we add in a toolbar menu this bug maybe fixed,
* Keyboard shortcuts can be pressed at the same time which makes bugs for undo and redo if you aren't careful!
* https://github.com/motla/vue-file-toolbar-menu
* Drag ascii canvas then right click and it gets stuck - related to vue draggable
## Focusing on Now / Roadmap
* Arrow keys and space to use brush, eraser,
* More Context Menus (right click menu)
* Brushes Canvas right click
* ASCII right click

Просмотреть файл

@ -81,40 +81,52 @@ export default {
hotkeys("*", function (event, handler) {
event.preventDefault();
if (_this.isBrushing) {
if (_this.isBrushing || _this.isErasing) {
switch (event.key) {
case "ArrowUp":
_this.y--;
_this.drawBrush();
_this.drawBrush(_this.isErasing);
_this.delayRedrawCanvas();
break;
case "ArrowDown":
_this.y++;
_this.drawBrush();
_this.drawBrush(_this.isErasing);
_this.delayRedrawCanvas();
break;
case "ArrowLeft":
_this.x--;
_this.drawBrush();
_this.drawBrush(_this.isErasing);
_this.delayRedrawCanvas();
break;
case "ArrowRight":
_this.x++;
_this.drawBrush();
_this.drawBrush(_this.isErasing);
_this.delayRedrawCanvas();
break;
case " ":
_this.canTool = true;
_this.drawBrush();
_this.canTool = false;
_this.$store.commit(
"updateAsciiBlocks",
_this.currentAsciiLayerBlocks
);
if (_this.isBrushing) {
_this.canTool = true;
_this.drawBrush();
_this.canTool = false;
_this.$store.commit(
"updateAsciiBlocks",
_this.currentAsciiLayerBlocks
);
}
if (_this.isErasing) {
_this.canTool = true;
_this.eraser();
_this.canTool = false;
_this.$store.commit(
"updateAsciiBlocks",
_this.currentAsciiLayerBlocks
);
}
break;
}
}