docs(mystery): spec for engine prereqs (verbs, disambiguation, ending UI) #1
+2
-3
@@ -179,7 +179,6 @@
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
[data-mystery-input]:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
[data-mystery-input].ended {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
+5
-1
@@ -34,7 +34,11 @@ if (!transcriptEl || !inputEl) {
|
||||
}
|
||||
|
||||
const syncEndedUI = (): void => {
|
||||
inputEl!.disabled = state.endedWith !== null
|
||||
// Don't disable the input — the player still needs to type `restart` or
|
||||
// `undo`. A `disabled` input rejects keydown events entirely. Use a class
|
||||
// for visual styling instead; the keydown handler enforces the input
|
||||
// restriction.
|
||||
inputEl!.classList.toggle('ended', state.endedWith !== null)
|
||||
}
|
||||
|
||||
const buildParserContext = (s: GameState): ParserContext => {
|
||||
|
||||
Reference in New Issue
Block a user