[PR #154] [MERGED] Add ESC key to close window in qualifying and race replay interfaces #179

Closed
opened 2026-05-07 00:19:04 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/154
Author: @thomaslok0516
Created: 1/4/2026
Status: Merged
Merged: 1/8/2026
Merged by: @IAmTomShaw

Base: mainHead: feat/esc


📝 Commits (1)

  • 0abbf20 Add ESC key to close window in qualifying and race replay interfaces

📊 Changes

3 files changed (+11 additions, -1 deletions)

View changed files

📝 src/interfaces/qualifying.py (+6 -1)
📝 src/interfaces/race_replay.py (+4 -0)
📝 src/ui_components.py (+1 -0)

📄 Description

Problem

When using the qualifying and race replay interfaces, I struggled to find a way to go back to the race selection page. There was no obvious exit mechanism, which made navigation confusing.

Solution

Added ESC key support to close the window in both interfaces:

  • QualifyingReplay: Added ESC key handler that closes the window
  • RaceReplay: Added ESC key handler that closes the window

Changes

  • Added on_key_press handler for arcade.key.ESCAPE in src/interfaces/qualifying.py
  • Added on_key_press handler for arcade.key.ESCAPE in src/interfaces/race_replay.py
  • Updated LegendComponent in src/ui_components.py to include ESC key in control instructions
  • Updated control legend in QualifyingReplay to show ESC key option

Testing

  • Tested ESC key functionality in qualifying interface
  • Tested ESC key functionality in race replay interface
  • Tested ESC key functionality in sprint qualifying interface
  • Tested ESC key functionality in race qualifying interface
  • Verified control legends display correctly in all above interfaces
    image
    image
    image
    image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/IAmTomShaw/f1-race-replay/pull/154 **Author:** [@thomaslok0516](https://github.com/thomaslok0516) **Created:** 1/4/2026 **Status:** ✅ Merged **Merged:** 1/8/2026 **Merged by:** [@IAmTomShaw](https://github.com/IAmTomShaw) **Base:** `main` ← **Head:** `feat/esc` --- ### 📝 Commits (1) - [`0abbf20`](https://github.com/IAmTomShaw/f1-race-replay/commit/0abbf20861b48d00c6eae4424d5e7610a10bfb05) Add ESC key to close window in qualifying and race replay interfaces ### 📊 Changes **3 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/interfaces/qualifying.py` (+6 -1) 📝 `src/interfaces/race_replay.py` (+4 -0) 📝 `src/ui_components.py` (+1 -0) </details> ### 📄 Description ## Problem When using the qualifying and race replay interfaces, I struggled to find a way to go back to the race selection page. There was no obvious exit mechanism, which made navigation confusing. ## Solution Added ESC key support to close the window in both interfaces: - **QualifyingReplay**: Added ESC key handler that closes the window - **RaceReplay**: Added ESC key handler that closes the window ## Changes - Added `on_key_press` handler for `arcade.key.ESCAPE` in `src/interfaces/qualifying.py` - Added `on_key_press` handler for `arcade.key.ESCAPE` in `src/interfaces/race_replay.py` - Updated `LegendComponent` in `src/ui_components.py` to include ESC key in control instructions - Updated control legend in `QualifyingReplay` to show ESC key option ## Testing - Tested ESC key functionality in qualifying interface - Tested ESC key functionality in race replay interface - Tested ESC key functionality in sprint qualifying interface - Tested ESC key functionality in race qualifying interface - Verified control legends display correctly in all above interfaces <img width="2940" height="1710" alt="image" src="https://github.com/user-attachments/assets/509d7d39-dfa3-4ac2-a210-3fee70dca753" /> <img width="2932" height="1714" alt="image" src="https://github.com/user-attachments/assets/76f08645-808b-46df-aaf2-45c21ed23d1a" /> <img width="2936" height="1684" alt="image" src="https://github.com/user-attachments/assets/5e4811fe-adc0-4a14-86a3-062e83b1035e" /> <img width="2934" height="1694" alt="image" src="https://github.com/user-attachments/assets/54c07065-6739-489b-a868-fed6916db930" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:19:04 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/f1-race-replay#179
No description provided.