Skip to content

Keep focus on prompt during opponent-hand reveal#10900

Open
MostCromulent wants to merge 3 commits into
Card-Forge:masterfrom
MostCromulent:fix-floatingzone-reveal-focus
Open

Keep focus on prompt during opponent-hand reveal#10900
MostCromulent wants to merge 3 commits into
Card-Forge:masterfrom
MostCromulent:fix-floatingzone-reveal-focus

Conversation

@MostCromulent

@MostCromulent MostCromulent commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #10763.

#10763 stopped the floating-zone search filter from stealing focus by gating its focus grab on the prompt's OK/Cancel buttons being enabled.

That covered normal play, but opponent-initiated hand reveal still grabbed focus: it shows the floating zone and the OK/EndTurn confirm as two separate EDT tasks, with the zone shown first — so when the zone checked whether a prompt button was actionable, the OK button hadn't been enabled yet, and focus went to the filter.

This establishes the confirm prompt before showing the zone, so the OK button is already enabled when the zone decides where focus goes. Focus stays on the prompt; the filter stays clickable.

EDIT: Driveby - dim unrevealed cards

Tacked a small visual tweak onto this PR since it lives in the same reveal flow: when an opponent reveals a card, the floating zone shows their whole hand, rendering blank card backs for the cards that remain unrevealed.

Those backs are now dimmed — reusing the same darkening already applied to unselectable cards during selection — so the revealed card(s) stand out instead of getting lost among identical backs. The dimming only kicks in when at least one card in the zone is viewable, so an all-hidden zone (e.g. peeking at an opponent's full hand) is left unchanged.


🤖 Generated with Claude Code

The floating-zone hand reveal showed its window before the InputConfirm
enabled its OK button, so the zone's focus check saw no actionable prompt
button and grabbed keyboard focus to its search filter instead of leaving
it on the prompt. Establish the prompt before showing the zone so the OK
button is already enabled when the zone decides where focus goes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MostCromulent MostCromulent requested a review from tool4ever June 6, 2026 03:56
@MostCromulent MostCromulent changed the title Keep prompt focus on opponent-hand reveal floating zone Keep focus on prompt during opponent-hand reveal Jun 6, 2026
@MostCromulent MostCromulent added the BUG Something isn't working label Jun 7, 2026
MostCromulent and others added 2 commits June 7, 2026 12:52
When an opponent reveals a card, the floating zone shows their whole
hand, rendering blank card backs for the cards that remain unrevealed.
Dim those blank backs so the revealed card/s stand out, reusing the
same darkening already applied to unselectable cards during selection —
so a hidden card reads as de-emphasized the way an unselectable one
does. Only applies when at least one card in the zone is viewable,
leaving an all-hidden zone unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…reveal-focus

# Conflicts:
#	forge-gui-desktop/src/main/java/forge/view/arcane/CardPanel.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUG Something isn't working GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant