Add a bunch of TODOs
This commit is contained in:
@ -8,6 +8,7 @@ import { K, getKeyboardString, keyPressed, shiftKeyDown } from "./keyboard.ts";
|
||||
// deno-lint-ignore prefer-const
|
||||
let tab: "code" | "sprite" | "map" | "sfx" | "music" = "code";
|
||||
|
||||
// TODO: Make scrolling work
|
||||
const codeTabState = {
|
||||
scrollX: 0,
|
||||
scrollY: 0,
|
||||
@ -139,6 +140,7 @@ const drawCodeField = (code: string, x: number, y: number, w: number, h: number)
|
||||
if (anchor === focus) {
|
||||
fillRect(x+focusX*fontWidth-scrollX, y+focusY*(fontHeight+1)-scrollY, fontWidth+1, fontHeight+1, COLOR.RED);
|
||||
} else {
|
||||
// TODO: Draw this selection better
|
||||
fillRect(x+anchorX*fontWidth-scrollX, y+anchorY*(fontHeight+1)-scrollY, fontWidth+1, fontHeight+1, COLOR.GREEN);
|
||||
fillRect(x+focusX*fontWidth-scrollX, y+focusY*(fontHeight+1)-scrollY, fontWidth+1, fontHeight+1, COLOR.YELLOW);
|
||||
}
|
||||
@ -154,7 +156,11 @@ const update = () => {
|
||||
if (keyboardString) {
|
||||
codeTabState.insertText(keyboardString);
|
||||
}
|
||||
// TODO: Handle ctrl-C, ctrl-V, ctrl-X, ctrl-Z
|
||||
// TODO: Make ctrl-/ do commenting out (take inspiration from tab)
|
||||
|
||||
if (keyPressed(K.ENTER)) {
|
||||
// TODO: Make this play nicely with indentation
|
||||
codeTabState.insertText("\n");
|
||||
}
|
||||
if (keyPressed(K.TAB)) {
|
||||
|
Reference in New Issue
Block a user