Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbuick committed May 4, 2024
1 parent 54be463 commit 8e94a16
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion zss/firmware/zzt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import {
dirfrompts,
ptapplydir,
COLLISION,
readexpr,
} from './wordtypes'

const STAT_NAMES = new Set([
Expand Down
8 changes: 7 additions & 1 deletion zss/gadget/components/userinput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ document.addEventListener(
case 'tab':
invoke(INPUT.MENU_BUTTON, mods)
break
case '?':
if (mods.shift) {
invoke(INPUT.DEBUG_BUTTON, mods)
}
break
default:
// we should have gamepad input that moves between hotkey inputs,
// which then can be activated with the ok button
Expand Down Expand Up @@ -124,6 +129,7 @@ type UserInputProps = {
OK_BUTTON?: UserInputHandler
CANCEL_BUTTON?: UserInputHandler
MENU_BUTTON?: UserInputHandler
DEBUG_BUTTON?: UserInputHandler
keydown?: KeyboardInputHandler
}

Expand Down Expand Up @@ -162,7 +168,7 @@ export function UserFocus({ blockhotkeys, children }: UserFocusProps) {
user.root = old
user.ignorehotkeys = oldconfig
}
}, [])
}, [current, blockhotkeys])

return (
<UserInputContext.Provider value={current}>
Expand Down
1 change: 1 addition & 0 deletions zss/gadget/data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,5 @@ export enum INPUT {
OK_BUTTON,
CANCEL_BUTTON,
MENU_BUTTON,
DEBUG_BUTTON,
}
1 change: 1 addition & 0 deletions zss/memory/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type BOARD_ELEMENT_STATS = {
inputok?: number
inputcancel?: number
inputmenu?: number
inputdebug?: number
data?: any
[key: string]: WORD_VALUE
}
Expand Down

0 comments on commit 8e94a16

Please sign in to comment.