Repository navigation
Options > Other: profiles, the clock and the alarm as the original's; network greyed - #118
Closed
MortenLyhr wants to merge 6 commits into
Closed
MortenLyhr wants to merge 6 commits into
MortenLyhr wants to merge 6 commits into
Conversation
… OpenCiv4's own options on their own tab The original keeps the player options in its player profile and sends them to the active player at the start of every game, new or loaded (CvGame::sendPlayerOptions); OpenCiv4 used the XML's defaults for a new game and the save's own after a load, and never wrote them to profile.ini. Now Utility holds the profile's (profile.ini player.N), a choice sent from the options screen goes into it and is written at once. The options screen's check boxes get the theme's GFC_Control_StandardCheckBox_Style, as the custom game screen's; W A S D, idle turns and edge scrolling move to an OpenCiv4 tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rges cleanly with bssth#85) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ly with bssth#85) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…abs, GFC's box layout Measured on the original's options screen (Wine, BUG + BULL): the standard window's title bar with the title at the left, tabs as wide as their words from the left (the theme's tab skins, the chosen one lighter, a baseline under them), 31 px rows (GFC's default control height), 16 px text, a box's children as wide as they need with the rest to those that expand (the two columns of player options) or to the spacers (Language at the panel's foot), Restore Defaults and Exit centred under the panel. Empty panels take no room. CyGTabCtrl's setActiveTab/getActiveTab work, so a script can open a tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…owed Before the player options were kept as choices, the options screen wrote every player option it had shown, and it showed those the profile did not have as off. Such a profile has Wait at End of Turn off (and advisor pop-ups, Sid's tips) though the player never chose it; with Wait at End of Turn off the game core ends each turn by itself once a unit has moved, so turns seemed to end on their own. The profile now has a version (2). One without it gets, once, the XML's default for the options that are on by default and off there; every other choice stays, and from then on off is the player's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… network greyed Measured in the original (Wine, BUG Mod) and made the same: - Profiles: one file each, Profiles/<name>.ini beside profile.ini (the original's Profiles\<name>.pfl), the loaded one named by profile.ini's UserProfile (CivilizationIV.ini's). The drop-down loads one (its options to the sounds, graphics, player options, minimap toggles and clock), Create New Profile writes the options under the typed name and loads it, Delete Profile deletes a file (the loaded one: the first is loaded; the last is kept). profile.ini keeps OpenCiv4's own options, the same whichever is loaded; an older profile.ini becomes the profile "openciv4". - Clock: setClockOn marks the clock just turned on (BUG's NJAGC starts over); getClockText in the user's own short time format (CoreFoundation, as the original takes Windows'), in 24 hours with 24 Hour Clock, with a * while the alarm is set. - Alarm: toggleAlarm sets it hours and minutes from this minute with the "Alarm will go off at 7:06 AM." popup; the getters as the original's (time left in the boxes, -1 when off); at that minute AS2D_ALARM and the "RIIIIIIIIING!" popup. - Broadband / Modem: greyed, with a tooltip saying why (no multiplayer); clicks do nothing. CyGTabCtrl.setEnabled works. 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.
Stacked on #87 (
fix/options-screen): this branch holds its commits, so merge #87 first (or this merges both). Only the last commit (c4ef27a) is new.The Other tab looked like the original's (#87), but most of it did nothing. Each control was measured in the original (Wine, BUG Mod) and made the same.
Profiles
Before: one profile,
profile.ini. The drop-down listed only it, and Create New Profile and Delete Profile did nothing.The original: one file per profile (
Profiles\<name>.pfl), and CivilizationIV.ini'sUserProfilenames the one loaded at start.UserProfilechanges at once.Now:
My Games/openciv4/Profiles/<name>.ini, in the samekey=valueform as before, andprofile.ini'sUserProfile=names the loaded one.profile.inikeeps OpenCiv4's own options (the OpenCiv4 tab and the ini settings). They stay the same whichever profile is loaded, as the ini does in the original.profile.inibecomes the profileopenciv4on first start, so nothing is lost.Clock
setClockOnnow marks the clock "just turned on", on every call as the original does, so BUG's NJAGC clock restarts its time/turn alternation. It always returned False before.06.52on this Danish Mac in Wine). OpenCiv4 now uses the Mac's own short time format (CoreFoundationCFDateFormatter;07.08). It was a fixed%H:%Mbefore.Alarm
Before, the alarm only stored its numbers. Now it works as the original's:
toggleAlarm(on, h, m)sets it to go off h:m after the current minute.6:53with 24 Hour Clock), as in Wine.getAlarmHour/Mingive -1 and 0:0 when no alarm is set.*in front while the alarm is set (Wine:*06.52).AS2D_ALARMand shows "RIIIIIIIIING! Time is now …". The alarm is not stored in the profile.Network
Broadband / Modem write the ini's
Bandwidth, which only matters in multiplayer. They are now greyed out, with a tooltip saying OpenCiv4 has no multiplayer, and clicks are ignored.CyGTabCtrl.setEnablednow works.Not checked in Wine
TXT_KEY_MISC_ALARM_GOES_OFF,AS2D_ALARM).Testing
tests/options_other_test.py(new) covers:profile.iniinto a profile, and creating, switching, restarting with and deleting profiles;*, the ring, and the time left;tests/player_options_test.pyreads the profile from its new place.Profiles/openciv4.iniwith every value kept;*07.10on the clock.🤖 Generated with Claude Code