Repository navigation
End turn button as the original's: art, colours and beat - #72
Closed
MortenLyhr wants to merge 1 commit into
Closed
MortenLyhr wants to merge 1 commit into
MortenLyhr wants to merge 1 commit into
Conversation
…urs and beat
The original draws the button's style (HUD_EndTurn_btn.tga, a brass ring) as it is, and over
it the theme's glass dot (SF_CtrlTheme_Civ4_Control_Button_EndTurn_Skin: HUD_EndTurn.tga at
its size in the middle) with the state's colour added less half (AddSigned). OpenCiv4 tinted
the whole ring instead.
The states were the wrong way round: END_TURN_GO, a steady green dot (EndTurnDot_Green), is
the original's while units can still move; once the turn is over and the end of turn message
is up, the dot is red, sinking from EndTurnDot_Red to EndTurnDot_DarkRed and back. While the
other civilizations move the button is hidden (shouldDisplayEndTurnButton).
The beat, measured in Wine at 120 frames a second: every 1.5 s the red rises over 0.5 s, holds
0.5 s and sinks over 0.5 s; the end of turn message ("Press <ENTER> to end turn...",
"Waiting for other Civilizations...") blinks with it, gone around the darkest red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 20, 2026
Contributor
Author
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.
What it changes
The end turn button ("evil eye") now looks and behaves as the original's, going by its theme files and measured in the original under Wine.
Button_HUDEndTurn_Style(HUD_EndTurn_btn.tga, a brass ring), as it is. Over it the engine draws the theme's own skinSF_CtrlTheme_Civ4_Control_Button_EndTurn_Skin:HUD_EndTurn.tga, a 22×22 grey glass dot at its size in the middle (GFC_BITMAPSKIN_CENTER_FIXED), with the state's colour added less half (FactorCombine = GColorCombine(AddSigned, Modulate)). OpenCiv4 tinted the whole ring instead.END_TURN_GO("Green" inCvMainInterface.py) is the original's state while the player still plays. That gives a steadyEndTurnDot_Greendot, even with a unit waiting for orders. Once the turn is over and "Press to end turn..." shows, the state isEND_TURN_OVER_HIGHLIGHT/_DARK("Red"), and the dot beats betweenEndTurnDot_RedandEndTurnDot_DarkRed.ui_end_turn_statenow gives OVER with the end of turn message, and GO otherwise.shouldDisplayEndTurnButtonfollows whether the active player's turn is active, so the script hides the button during the AI turn, as the original does ("Waiting for other Civilizations..." shows instead).Theme::colour(name, fallback)reads a colour the theme defines (hereSF_CtrlTheme_Civ4_Control_Color_EndTurnDot_*fromCiv4Theme_Common.thm).The original's dot centre measures exactly grey 171 plus the theme colour less 128: green (43,235,43), red from (235,43,43) to (143,43,43). OpenCiv4's green is now (39,231,39).
Compared with the original
Test scenario, the original (Beyond the Sword under Wine) on the left, OpenCiv4 on the right.
How it was checked
ctestpasses: 13/13 (macOS, Release).--turns 100 --map Fractal --size STANDARD --seed 7gives the same checksum as master on every turn, ending atD7D43800.Both before pictures were taken on master, where the scenario's free starting units are awake (#63), so the turn is never over at the start and master shows red with units still to move. The after pictures have #63 applied, so the turn can be over at the start, as in the original.
🤖 Generated with Claude Code