Keep focus on prompt during opponent-hand reveal#10900
Open
MostCromulent wants to merge 3 commits into
Open
Conversation
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>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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