[PR #142] [MERGED] Fix button click behavior and implement interactive hold-to-seek logic #171

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

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/142
Author: @MananJK
Created: 12/30/2025
Status: Merged
Merged: 1/10/2026
Merged by: @IAmTomShaw

Base: mainHead: button-updations


📝 Commits (4)

  • 231e448 Made changes to the button behaviour
  • d48a00e Merge branch 'main' into button-updations
  • dce5c92 Fixed timelapse speed bug
  • 2055706 Add missing multiplier for seek speed in qualifying

📊 Changes

3 files changed (+95 additions, -26 deletions)

View changed files

📝 src/interfaces/qualifying.py (+41 -12)
📝 src/interfaces/race_replay.py (+35 -5)
📝 src/ui_components.py (+19 -9)

📄 Description

Identified and fixed a bug where users had to repeatedly click the arrow keys to seek to a specific time during the race. I implemented a button hold-down feature for both the keyboard arrow keys and the on-screen mouse buttons.

When held, the race pauses and seeks (rewind/forward) continuously. The playback state is maintained for the duration of the action; when the button is released, the race resumes automatically. If the user had already paused the race manually beforehand, that state is respected and the race remains paused after the seek action.

Changes:

  • Fixed Interactive Clicks: Added a mouse press handler to the main race replay interface. Click events are now correctly dispatched to the Leaderboard, Progress Bar, and Playback Controls.
  • Corrected Speed Controls: Moved playback speed logic from hover to click. This ensures speed changes only occur upon an intentional user click.
  • Added Hold-to-Seek: Enhanced the Playback Controls to support continuous seeking (rewind/fast-forward) when buttons are held down.
  • Playback State Preservation: Implemented logic to ensure the race correctly returns to its previous state (Paused or Playing) once a seek action is finished.

https://github.com/user-attachments/assets/71e14e46-6a72-4123-8483-5b6514a5d10e


🔄 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/142 **Author:** [@MananJK](https://github.com/MananJK) **Created:** 12/30/2025 **Status:** ✅ Merged **Merged:** 1/10/2026 **Merged by:** [@IAmTomShaw](https://github.com/IAmTomShaw) **Base:** `main` ← **Head:** `button-updations` --- ### 📝 Commits (4) - [`231e448`](https://github.com/IAmTomShaw/f1-race-replay/commit/231e4482b0f8635ff00573b02131811e555d47ea) Made changes to the button behaviour - [`d48a00e`](https://github.com/IAmTomShaw/f1-race-replay/commit/d48a00e953bd978d06f142069e41fc4c93304841) Merge branch 'main' into button-updations - [`dce5c92`](https://github.com/IAmTomShaw/f1-race-replay/commit/dce5c92cff94e18c3f8519ceabbf9420818674ff) Fixed timelapse speed bug - [`2055706`](https://github.com/IAmTomShaw/f1-race-replay/commit/20557067067812bd234ea65e008ef4dad09c6b72) Add missing multiplier for seek speed in qualifying ### 📊 Changes **3 files changed** (+95 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `src/interfaces/qualifying.py` (+41 -12) 📝 `src/interfaces/race_replay.py` (+35 -5) 📝 `src/ui_components.py` (+19 -9) </details> ### 📄 Description Identified and fixed a bug where users had to repeatedly click the arrow keys to seek to a specific time during the race. I implemented a **button hold-down feature** for both the keyboard arrow keys and the on-screen mouse buttons. When held, the race pauses and seeks (rewind/forward) continuously. The playback state is maintained for the duration of the action; when the button is released, the race resumes automatically. If the user had already paused the race manually beforehand, that state is respected and the race remains paused after the seek action. #### Changes: * **Fixed Interactive Clicks**: Added a mouse press handler to the main race replay interface. Click events are now correctly dispatched to the Leaderboard, Progress Bar, and Playback Controls. * **Corrected Speed Controls**: Moved playback speed logic from hover to click. This ensures speed changes only occur upon an intentional user click. * **Added Hold-to-Seek**: Enhanced the Playback Controls to support continuous seeking (rewind/fast-forward) when buttons are held down. * **Playback State Preservation**: Implemented logic to ensure the race correctly returns to its previous state (Paused or Playing) once a seek action is finished. https://github.com/user-attachments/assets/71e14e46-6a72-4123-8483-5b6514a5d10e --- <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:02 +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#171
No description provided.