Make changes playable

This commit is contained in:
dylan
2023-05-05 12:21:14 -07:00
parent 99655e663c
commit b58a0d8cb1
2 changed files with 14 additions and 10 deletions

View File

@ -1,10 +1,9 @@
import { clearScreen, fillRect } from "./window.ts";
import { font, fontWidth, fontHeight } from "./font.ts";
import { fontWidth, fontHeight } from "./font.ts";
import { drawText } from "./builtins.ts";
import { COLOR } from "./colors.ts";
import { getCart } from "./cart.ts";
import {getSheet, setSheet} from "./sheet.ts";
import { K, getKeyboardString, getKeysPressed, keyDown, keyPressed, shiftKeyDown } from "./keyboard.ts";
import { K, getKeyboardString, keyPressed, shiftKeyDown } from "./keyboard.ts";
// deno-lint-ignore prefer-const
let tab: "code" | "sprite" | "map" | "sfx" | "music" = "code";
@ -150,7 +149,7 @@ const drawCodeField = (code: string, x: number, y: number, w: number, h: number)
const update = () => {
if (tab === "code") {
const {code, anchor, focus, focusX, focusY} = codeTabState;
const { focus, focusX, focusY} = codeTabState;
const keyboardString = getKeyboardString();
if (keyboardString) {
codeTabState.insertText(keyboardString);