Repository navigation
Keys and clicks go to the screen up, not the map under it (Enter on a tech's splash) - #167
Open
MortenLyhr wants to merge 2 commits into
Open
MortenLyhr wants to merge 2 commits into
MortenLyhr wants to merge 2 commits into
Conversation
When the tech being researched is discovered, the original shows only its splash screen: the civic and "what to research next" questions come after it is closed, so Esc closes the splash first (Wine, BUG + BULL). OpenCiv4 showed the popups at once under the splash, and Esc closed the popup underneath. The game's queued popups now wait while a screen of its own (an advisor, a splash, a wonder's movie) is up, as wonder movies already did; what is opened at once (the game's menu, a script's popup) still shows over it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tech's splash) With a new tech's splash or an advisor up, the original keeps the map's input: Enter closes the screen as its Continue or Exit does, Space and the units' keys do nothing, and a click on the map beside it goes nowhere; F1 and the other screens' keys still open the next advisor (Wine, BUG + BULL). OpenCiv4 sent them on to the map: Enter cycled the units (or ended the turn), Space skipped the unit, a click selected under the splash. A screen shown without bPassInput now holds that input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Split out of #111 as asked in its review. Stacked on #111: it needs the popups to wait under the splash.
The problem
With a new tech's splash (or an advisor) up, OpenCiv4 sent the keys and clicks on to the map under it:
key 13: action 429 Cycle Units).What the original does (Wine, BUG + BULL)
With a new tech's splash up:
wine-enter44/2-enter.png).7-space.png).8-click-outside.png).With the Tech Advisor up (F6):
adv/a2-space.png).adv/a3-enter.png).adv/a4-f6-then-f1.png).What it changes
A screen shown without
bPassInputholds the map's input while it is up. That isshowScreen(state, False): the splash, the advisors, the Civilopedia. It is not the main interface, the city screen, a talk or the dot-map overlay.holdsInput(oc4screens.holdsInput(),Screens::holdsInput()): true while such a screen is shown. It uses thepassInputflag thatshowScreenalready stores (One advisor at a time; advisors open over a talk and leave it as it was #158). It is always false on the main menu outside a game (m_menu).main.cpp,press): plain Enter under such a screen callsscreens.escape(), as Esc does. So Enter never reaches the map's hotkeys, or a popup waiting under the screen (Popups wait while a screen of its own is up (a new tech's splash) #111). Shift/Ctrl/Alt+Enter go on as before.hotkeyAction,screenHolds): actions whose control isNO_CONTROL(the units' missions and commands) or up toCONTROL_AUTOMOVESinControlTypes. That covers centring on and selecting units and cities, next/previous/cycle unit, end turn and Force End of Turn. The numpad moves are skipped too. The screens' own controls come afterCONTROL_AUTOMOVES(the advisors, the Civilopedia, options, saving, ping, sign, grid, yields), so they still work: F1 over an advisor opens the next one.main.cpp, the frame loop): while such a screen is up, the plot clicks the window hands on (takeClicks) are cleared, so a click beside the splash selects nothing.How it was checked
OpenCiv4 (BUG + BULL, the test map, research one turn from done with
testgames/shots/round2/tech-next-turn.py;>ends the turn and shows the splash):Before (master before Leave Go To (and every interface mode) when the selection changes, as the original #156/One advisor at a time; advisors open over a talk and leave it as it was #158,
oc4-round2/44-enter-before.log),--keys ">......%e":key 13: action 429 Cycle Units, and the splash stays.After, the same keys:
key 13: closes the screen up, and the civic question is up, as in Wine.After,
">...... "(Space):key 32: action -1 (none), and the splash stays.After,
">......<300,450>"(a click on the map beside the splash): the splash stays and the Settler is still selected. The same click with no splash deselects it.After, the Tech Advisor (
%6), as in Wine: Enter closes it (key 13: closes the screen up), Space does nothing (key 32: action -1 (none); it stays, the unit stays selected), F1 opens the Domestic Advisor (key 112: action 471 Domestic Advisor). In Wine, a click beside an advisor, the numpad moves and unit order keys other than Space were not tried.ctest 15/15. Sync checksums equal to #111's on all 100 turns (
D7D43800): interface only.Pictures (Wine | OpenCiv4)
Enter on a new tech's splash: Wine before, Wine after (the civic question is up), OpenCiv4 before (Cycle Units, the splash stays), OpenCiv4 after.
A click on the map beside the splash: Wine (nothing), OpenCiv4 after (the Settler stays selected), and the same click with no splash up (it deselects).
Wine, the Tech Advisor: Enter closes it; F1 over it opens the Domestic Advisor.
🤖 Generated with Claude Code