Require an owned mouse release in transfer modals (by Codex)

Late or repeated releases from a post-match table cannot decline the immediately following transfer or acknowledge its confirmation. Track presses within each release-driven modal; keep semantic Source DOWN actions and fresh left/right gestures. Reproduced and verified through the real post-match table-to-transfer GUI flow.

Refs: #44
This commit is contained in:
Codex committed 2026-11-01 19:19:21 +01:00
1 parent a5aa4c6a08
commit 8862bd4f89
5 files changed
+58 -5

No files matched your search

+11
View File
@@ -530,6 +530,17 @@ bool IncomingTransferScreen::dismiss_notice() {
return true;
}
void IncomingTransferScreen::pointer_down(bool right) {
pointer_buttons_ |= right ? 2 : 1;
}
std::optional<int> IncomingTransferScreen::pointer_up(int x, int y, bool right, uint64_t elapsed_ms) {
const uint8_t button = right ? 2 : 1;
if (!(pointer_buttons_ & button)) return std::nullopt;
pointer_buttons_ &= uint8_t(~button);
return click(x, y, right, elapsed_ms);
}
std::optional<int> IncomingTransferScreen::click(int x, int y, bool right, uint64_t elapsed_ms) {
if (confirmation_mode_) {
if (!right && x >= 95 && x <= 220 && y >= 166 && y <= 176)