Repository navigation
City screen: no units, flags, city bars or resource bubbles on the map - #109
Closed
MortenLyhr wants to merge 1 commit into
Closed
MortenLyhr wants to merge 1 commit into
MortenLyhr wants to merge 1 commit into
Conversation
While a city's screen is up the original shows no units on the map (own, foreign or barbarian), so no flags and health bars either, no city bars (the selected city's and the others'), and no resources' bubbles even with the resource layer on. The cities, signs, worked plots and yields stay. Checked in Wine with a test city that had all of these in its radius. MapView::Options::cityScreen (set from MapWindow's city view each frame) skips the units' figures, promotion glows, selection rings, flags and health bars, and the overlay of flags and city bars; MapWindow::drawLayers skips the resources' bubbles and the units' icons in the city view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 21, 2026
Contributor
Author
This was referenced Nov 21, 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.
While a city's screen is up, the original shows no units on the map (own, foreign or barbarian), so no flags or health bars, no city bars (the selected city's and the others'), and no resources' bubbles even with the resource layer on. The cities, signs, worked plots and yields stay. OpenCiv4 drew all of them.
MapView::Options::cityScreenis set from the map window's city view each frame. While it is on,MapViewdraws no units (figures, promotion glows, selection rings, flags, health bars) and no city bars, and the layers draw no resources' bubbles or units' icons. Clicks on the city screen then land on the plot, not on a hidden unit. Drawing only; no game rules change.Checked in the original (Wine, BtS 3.19, 1600x900) with a test city that had all of these in its radius: your warrior in the city, your worker, a hurt swordsman, another civ's archer, a hurt barbarian, a second city in view, wheat, a sign.
City screen (Wine | OpenCiv4 before)


(Wine | OpenCiv4 after)
City screen, resource layer on (Ctrl+R) (Wine | before)


(Wine | after)
The OpenCiv4 pictures are from a build with this PR and the other open ones (yields, flags, city bars, bubbles), so the city screen is comparable to the original's.
Merging with other open PRs
MapWindow::drawLayers: keep Resource layer: the original's bubbles on pins #69's lines, add!cityViewto the bubbles' condition andif (low && layers.units && !cityView).MapView::draw: keepm->flagDraws.clear();, thenif (options.units && !options.cityScreen).m->cityBars.clear();to the top ofdrawOverlay, before the early return, or the hidden bars' old places stay clickable on the city screen.Checks
--turns 100 --map Fractal --size STANDARD --seed 7,D7D43800).🤖 Generated with Claude Code