Repository navigation
Options > Audio as the original's: theme sliders, speakers, own music folder; voice greyed - #119
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>
…ic folder - Sliders are the theme's (GFC_Control_StandardSlider_Style): track, the light blue fill on the side the control flag names (CF_SLIDER_FILL_DOWN / _UP), and the grip, which follows the mouse while held (NOTIFY_SLIDER_NEWSTOP to the script at each new stop). They were a stack of little check boxes. No click sound, as the original's. - Audio Speakers lists the original's 15 setups; the choice is kept, Mono plays both sides the same. - Custom Music Folder: Browse opens the system's folder dialog; ticked, the folder's MP3 and WAV files play instead of the era's soundtrack, at once. - Voice chat (the original's GameSpy voice) is shown with the system's devices but disabled, with a tool tip saying OpenCiv4 does not implement it. - The path box gets the row's width as the original's; an edit box's text is kept inside it. - --keys "<x,y:x2,y2>" drags with the left button (for scripted checks). 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 (66d7273) is new.Wine and after: the same volumes (20, 0, 10, 19, 1, 10, Music No Sound). The original's speakers list:
What it changes
Sliders. The six volume sliders and the two voice sliders were a stack of little check boxes (yellow bars). They are now the theme's slider (
GFC_Control_StandardSlider_Style): its track, the light blue fill on the side the script's control flag names (CF_SLIDER_FILL_DOWNfor the volumes: below the grip;CF_SLIDER_FILL_UPfor the voice ones: left of it), and the grip. A press sets the slider where it is pressed, and while the button is held the grip follows the mouse from stop to stop, as in the original. The script hearsNOTIFY_SLIDER_NEWSTOPat each new stop, so the volume changes at once. There is no click sound: in Wine a drag makes none.19 − volume(the script's20 - getVolume() - 1), so a volume of 19 or 20 shows at the top, and after a restart the grip is one stop above where it was let go. That is the original's too.addSlider), so BUG's sliders (the options' dot map brightness, the field of view slider) and the World Builder's diplomacy slider (−100 to 100) draw and drag the same way.Audio Speakers. The list was 15 empty rows. It now has the original's 15 setups (Mono, Stereo, Use System Config, Headphones, Dolby Surround, SRS Circle Surround, 4.0–8.1 Discrete, DirectSound 3D, EAX 2.0, EAX Advanced HD 3.0 and 4.0, as Wine's
getSpeakerConfigFromListgives them). The choice is kept in the profile and shown when the tab opens. (The original shows Mono whatever was saved: it compares the saved name, "Stereo", with the list's text keys.) On macOS the sound goes out as the system has it set; Mono mixes both sides together.Custom Music Folder. Browse opens the system's folder dialog. The folder chosen goes into the path box with the box ticked (the game's own
updateMusicPath) and is kept. While ticked, the folder's MP3 and WAV files play in random order instead of the era's soundtrack; ticking, unticking or choosing another folder fades the playing track out and switches at once. A long path is cut at the box's edge.Voice chat. The original's is GameSpy multiplayer voice, which OpenCiv4 doesn't have. The section is drawn as in the original, with the Mac's own microphones and outputs in the lists and the sliders at 67, but disabled, with the tool tip "OpenCiv4 does not implement voice chat."
Layout. As Wine's: the voice column keeps its width and the speakers and music column takes the rest; the path box fills its row. (The other tabs are pixel for pixel the same as before.)
Kept between games and restarts. The volumes, No Sound boxes, speakers and music folder are in
profile.ini, written after every control used, as before. They are the program's, not a game's, so loading another game keeps them (as the original's profile).Not done: the original's Sound Blaster X-Fi logo (left out by choice).
Testing
WINE_VOLUME=10) and OpenCiv4 side by side with volumes 20/0/10/19/1/10 and Music No Sound: grips and fills at the same places.--keys "<503,280:503,340>"(new: a left-button drag) drags Master in OpenCiv4 through the window's real input; the profile hasvolume.Master=5; a restart shows it kept.nosound.Music=1.oc4options.folderChosen, as the dialog answers): the path box shows it, the box is ticked,musicPathis kept, andOC4_PLAY_LOGshows the folder's files playing.D7D43800).🤖 Generated with Claude Code