🎨 Palette: Hide cursor during gameplay#62
Conversation
Added ANSI escape sequences to hide the cursor during active gameplay, reducing visual distraction and enhancing focus. The cursor is reliably restored on game exit, including signal interrupts, maintaining proper terminal state. Included verification script `verify_ux.py` using `pty`. Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Added ANSI escape sequences to hide the cursor during active gameplay, reducing visual distraction and enhancing focus. The cursor is reliably restored on game exit, including signal interrupts, maintaining proper terminal state. Fixed a redefinition error with struct pollfd in the CodeQL build that was causing a check suite failure. Included verification script `verify_ux.py` using `pty`. Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
🎨 Palette: Hide Cursor During Gameplay
💡 What:
Added ANSI escape sequence
\033[?25lto hide the cursor upon game start, and\033[?25hto explicitly restore the cursor upon any exit (normal completion, pressing 'q' to quit early, or viaCtrl+Cinterrupt signal).🎯 Why:
During rapid interaction in CLI games where text input is not required, the terminal cursor constantly blinking is an unnecessary visual distraction. Removing it enhances immersion and focus.
📸 Before/After:
Before: The cursor continuously flashed on the game board while the UI updated.
After: The game space is entirely clean, displaying only the UI.
♿ Accessibility:
Ensures that if the user aborts the program (
SIGINT), their terminal isn't broken (missing cursor), a common frustrating pitfall of terminal UX modifications.PR created automatically by Jules for task 15968153585006894458 started by @EiJackGH