Repository navigation
One advisor at a time; advisors open over a talk and leave it as it was - #158
Merged
Merged
Conversation
As the original does (seen in Wine, BUG + BULL, testgames/shots/advisors): - A screen of its own shown closes the ones up before it (F5 over F1, F9 over F8, F3 over F9, F4 over F7, F2 over the Sevopedia). Not the main interface, not a screen that passes the map's input through, not the talk, and not a lower group: the Sevopedia (setScreenGroup 1) opens over the tech advisor and Esc closes it back to it. - The same key again keeps the screen up (no toggle): unchanged. - Screens are drawn in the order they were shown, so the newest is on top (an advisor over the talk), and Esc closes the newest. - In an AI's talk the advisors' and the Civilopedia's keys open them over it; their EXIT leaves the talk as it was. Esc still goes to the talk, even under an advisor, as the original's. - --keys: "%1" ... "%9", "%0", "%=" type F1 ... F10, F12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 23, 2026
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.
Opening a second advisor left the first one up underneath it. The screens were drawn by their file id, not by the order they opened. So opening the Domestic Advisor (id 0) while the Military Advisor (id 14) was up put it behind the Military Advisor. In a talk with an AI, every key went to the talk, so F1–F12 did nothing. An advisor opened with the interface's button was drawn under the talk.
What the original does
All of this was seen in Wine with BUG + BULL: the test-map scenario, real key presses, and a logger listing the screens that are up.
CvPediaMain) callssetScreenGroup(1).The change
showScreenof a screen of its own closes the screens that were up before it (hide+CvScreensInterface.onClose, as Esc does). It never closes the main interface, a screen shown withbPassInput(the World Builder, BUG's dot map), or the talk. It also leaves a screen of a lower group open: a group-1 screen (the Sevopedia) opens over an advisor, and an advisor (group 0) replaces the Sevopedia.setScreenGroupandgetScreenGroupnow keep the group.--keys:%1…%9,%0,%=type F1 … F10 and F12 (used for the tests).Not observed and left as they were: Enter under an advisor in a talk (it still goes to the talk), and an advisor key over Dawn of Man, a tech's splash or a wonder movie (the new rule closes those, the same as any other screen of its own).
Merge note: this conflicts on one line with #148 (and so with #149/#150): #148 adds
_sliders.clear()directly above the draw-order line indisplay(). The fix is to keep both lines.Checks: ctest passes, and the checksum at turn 100 (
--turns 100 --map Fractal --size STANDARD --seed 7) is unchanged atD7D43800.Pictures
In each picture the panels are, left to right, Wine | before | after.
The Domestic Advisor, then the Military Advisor (before: the Domestic Advisor's header shows behind it):

The Domestic Advisor opened in a first-contact talk (before: drawn under the talk):

Wine | after: the advisor's EXIT leaves the talk as it was:

Wine | after: Esc on the Sevopedia goes back to the tech advisor:

🤖 Generated with Claude Code