Repository navigation
Popups wait while a screen of its own is up (a new tech's splash) - #111
MortenLyhr wants to merge 1 commit into
Conversation
|
One more commit: Playing with this PR, Enter on a new tech's splash did not close it: it went past the splash to the map's hotkeys (Cycle Units; with every unit moved, the end of the turn), and Space skipped the selected unit. The popups waited as they should, but the keys went through. What the original does (Wine, BUG + BULL), with a new tech's splash up:
What it changes: a screen shown without
Before / after (OpenCiv4, research one turn from done,
ctest 13/13; sync checksums equal master's on all 100 turns ( 🤖 Generated with Claude Code |
|
The description covers only the popup wait. Commit ceb72b4 also changes input: The two new 5-line comments ( |
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>
ceb72b4 to
1fe377d
Compare
|
Thanks. I moved the input change ( ctest 15/15; sync checksums equal on all 100 turns ( 🤖 Generated with Claude Code |



The problem
When the tech being researched is discovered, OpenCiv4 shows the tech's splash screen and, at the same time, the civic question ("Your society can now implement…") and then "What would you like to research next?". Esc closes the popup underneath, not the splash on top.
What the original does (Wine, BUG + BULL)
The tech discovered with
CyTeam.setHasTech(…, bAnnounce=True)(testgames/shots/round2/tech-new-popup.py):wine-round2/44-0-both.png); no popup is up under it.44-1-esc.png), then the research question once that is answered (44-4-after-civic.png).The game core queues both questions while the splash is up (
CvTeam::setHasTechruns the PythononTechAcquired, which shows the splash, beforechooseTech); the engine shows them only once the screen is gone, as it already did in OpenCiv4 for wonder movies (BUTTONPOPUP_PYTHON_SCREEN).What it changes
Interface::updatePopups: the game's queued popups (the player's queue, a save's too) wait while a screen of its own is up (oc4screens.modalUp: an advisor, a splash, a movie; not the main interface, the city screen or a talk). What is opened at once (addPopupimmediate: the game's menu) and a script's own popup (CyPopup) still show over a screen.Pictures (Wine | OpenCiv4)
Checks
D7D43800): interface only.round2/tech-next-turn.py),--keys ">": the splash alone;">....~": Esc closes it and the civic question is up.🤖 Generated with Claude Code