docs(mystery): spec for engine prereqs (verbs, disambiguation, ending UI) #1
+2
-3
@@ -179,7 +179,6 @@
|
|||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-mystery-input]:disabled {
|
[data-mystery-input].ended {
|
||||||
opacity: 0.4;
|
opacity: 0.55;
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -34,7 +34,11 @@ if (!transcriptEl || !inputEl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const syncEndedUI = (): void => {
|
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 => {
|
const buildParserContext = (s: GameState): ParserContext => {
|
||||||
|
|||||||
Reference in New Issue
Block a user