Skip to content

City screen: no units, flags, city bars or resource bubbles on the map - #109

Closed
MortenLyhr wants to merge 1 commit into
bssth:masterfrom
MortenLyhr:fix/city-screen-units
Closed

MortenLyhr wants to merge 1 commit into
bssth:masterfrom
MortenLyhr:fix/city-screen-units

Conversation

@MortenLyhr

Copy link
Copy Markdown
Contributor

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::cityScreen is set from the map window's city view each frame. While it is on, MapView draws 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)
city screen before
(Wine | OpenCiv4 after)
city screen after

City screen, resource layer on (Ctrl+R) (Wine | before)
resources before
(Wine | after)
resources 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

Checks

  • ctest passes.
  • Sync checksums equal master's on all 100 turns (--turns 100 --map Fractal --size STANDARD --seed 7, D7D43800).

🤖 Generated with Claude Code

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>
@MortenLyhr

MortenLyhr commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Included in bundle 1/6, #145, merged there with its own commits and with its conflicts with the other open PRs resolved (the bundle PR lists them). Closing in favour of #145.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant