Repository navigation
Fixes #376: End-turn buttons double-advancing turns in Observer Mode - #1001
Merged
ajhalme merged 1 commit intoOct 3, 2026
Merged
Conversation
Billytifft
commented
Sep 23, 2026
Billytifft
force-pushed
the
billy/observer-enter-double-turn
branch
2 times, most recently
from
September 30, 2026 15:48
9a1ee48 to
72c94f1
Compare
Contributor
|
LGTM |
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.
What was wrong
In Observer Mode, pressing Enter would often advance the turn twice.
Enter (and Space) are bound to the
end_turninput action, which callsOnPlayerEndTurn. But the two end-turn TextureButtons in the lower-rightinfo box were keyboard-focusable, so when either had focus Godot's
ui_acceptfired them too, emittingBlinkyEndTurnButtonPressed->OnPlayerEndTurna second time. NumPad Enter advanced only once becauseit is not bound to
end_turn, matching the reported behavior.How it was fixed
Set
FocusMode = FocusModeEnum.NoneonnextTurnButtonandboxRightRectangleButtoninLowerRightInfoBox.cs, so Enter/Space nolonger activate them via
ui_accept. Mouse clicks still work. This usesthe same pattern already established in
ConsoleButton.cs.How it was tested
Verified manually in Godot with Observer Mode (Cmd+Shift+Alt+O, fast
forward set to 0):
one turn per press (was two before the fix).
advances exactly one turn.
work and arrow-key unit movement is unaffected.
Build: 0 errors.
dotnet format ... --verify-no-changes: clean.Tests: 74/74 passed.
Fixes #376