feat: reduce font size and split sentences into two lines
- Reduce font size from 32px to 20px for sentences/paragraphs mode - Add breakTextIntoLines helper to split sentences naturally at spaces - Render sentences across two lines with proper color progression - Add space character to allowed input regex
This commit is contained in:
@@ -32,7 +32,7 @@ export const useKeyBindings = (gameManager: GameManager) => {
|
||||
|
||||
// handle letter and punctuation typing during game
|
||||
if (gameManager.gameStatus === "started") {
|
||||
if (ev.key.length === 1 && /[a-zA-Z.,!?]/.test(ev.key)) {
|
||||
if (ev.key.length === 1 && /[a-zA-Z.,!? ]/.test(ev.key)) {
|
||||
gameManager.handleTypedLetter(ev.key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user