Repository navigation
Diplomacy: the trade lists' help is a tooltip under the mouse (stacked on #150) - #183
Open
MortenLyhr wants to merge 137 commits into
Open
MortenLyhr wants to merge 137 commits into
MortenLyhr wants to merge 137 commits into
Conversation
With a city's screen up, a click on the map now goes to the game core's city screen handlers, as the original engine hands them over, instead of selecting units: - a click: CvGame::handleCityScreenPlotPicked (a plot of the city's is worked or let go; the city's own plot gives the citizens back to the governor; a plot outside closes the screen, CITY_SCREEN_CLICK_WILL_EXIT) - a right click: handleCityScreenPlotRightPicked (the forced choice taken away) - a double click: handleCityScreenPlotDoublePicked (on the city: the screen closes) Plot clicks now say whether they are the second of a double click (SDL's click count). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The city screen's top panel (Panel_City_Top_Style) spans the whole map area, but its skin is a frame with an empty middle (GFC_BITMAPSKIN_CENTER_EMPTY): only its top and sides are drawn. The interface took every click inside its rectangle, so the city's tiles could not be clicked. A themed panel now takes a click only where its skin draws something (Theme::covers, the same pieces Theme::draw puts down). The main interface's panels take the same clicks as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Selecting a city (its screen) now lets go of the selected units, as the game core's CvGame::selectUnit lets go of the cities: a unit selected before stayed selected under the city screen, showed its way on a right click and could be ordered there. When the screen closes, the game core selects the next unit that waits (CvGame::updateSelectionList). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
…off Windows) Points gamecore at the openciv4-dll commit that passes L"+"/L"" for %s in six wide Format calls (backlog: the city bar's defence, building and religion/corporation help lost their whole text on macOS and Linux). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The options screen asks both; they were unimplemented stubs that logged each call. There is no debug menu and no dial-up connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine works in the Beyond the Sword folder, so a relative scenario
path no longer pointed at the file ("cannot read the scenario"). A --map
that names an existing file is made absolute with the other command line
paths; a map script's name (Fractal, ...) stays as it is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a serif stand-in
The theme (Resource/Themes/Civ4/Civ4Theme_Common.thm) asks for Sylfaen at 12, 14, 16 and 22
for all the interface's text. macOS and Linux lack it, so every text fell back to a sans face.
The game ships it (Resource/Civ4/sylfaen{,b,i,bi}.ttf, Resource/Fonts, Assets/res/Fonts), and a
game in a Wine prefix has the Windows fonts beside it (drive_c/windows/Fonts): Theme::fontFolders
names them and Fonts::addFolders (FreeType) looks there too. No font is copied.
A missing serif family (Sylfaen, Georgia, Times New Roman...) now gets a serif stand-in
(Georgia, Noto Serif, DejaVu Serif, Liberation Serif, Times) before the sans defaults. macOS's
symbol and CJK faces join the per-character fallbacks: the capital's star (U+2605) was a box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ginal draws it addMultilineText took a label's rule (the game font: size 2, 14 px); the original draws it in the GFC control's normal font, Civ4Theme_Common.thm's .Normal = Size3_Normal, as it does setText. Measured on Dawn of Man's body against the original: word spacing and line breaks now match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BUG's city cycle arrows by the minimap (MainCityScrollMinus/Plus, WIDGET_CITY_SCROLL) and the Home/End keys run CONTROL_NEXTCITY/PREVCITY. With no city selected the game core asks the interface's selectLookAtCity, which was a stub, so they did nothing on the map. Now it selects the active player's city nearest the plot the camera looks at (as a selection, not the city screen); later presses cycle on from it (CvGame::cycleCities). getLookAtPlot gives that plot, and getSelectionPlot is the selected city's plot while cities are selected, so lookAtSelectionPlot moves the camera there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The original keeps four of the toggles by the minimap in its player profile (Profiles/<name>.pfl, named by CivilizationIV.ini's UserProfile): the plot grid, the bare map, the yields and the scores, as CyUserProfile's getGrid, getMap, getYields and getScores. It writes the file at each click, and every game takes them from there: after a restart, a new game, and a loaded save (a save made with the grid on loads with the profile's grid). The unit and resource icon layers are not kept. (Watched in Wine.) OpenCiv4 now keeps them in its own profile (Documents/My Games/openciv4/ profile.ini) as grid=, map=, yields=, scores=: oc4options gives them to the host when the profile is read, and Screens::frame tells it when one is switched, by its button or its key. The scores toggle works (it did nothing, and the scores showed always), and CyUserProfile / CyInterface read the toggles as they are. New test minimap_toggles (oc4options with a stand-in host): a switched toggle is in profile.ini at once and comes back after a restart and with readFromFile; an older profile gives the defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 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>
…first The original shows the game's messages in a see-through black box under the top bar (606 wide in the middle, a line of 18 for each), newest at the top, at most six; each line has a bullet and is drawn in the message's flash colour (BUG's foreign city founded in magenta, losses in red, white when it has none), colours in its text kept. A line shows at once and goes at once when its time is up; one pushed out by newer ones does not come back. Measured in Wine (BUG + BULL) from a film of the window at 1600 x 900. OpenCiv4 drew centred lines without a box, all white, oldest first, fading over their last second, up to twelve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hown Three pieces, found with BUG's tech advisor in Wine (BUG + BULL): - A panel's colour from setPanelColor tints the layers its theme style tints by the panel's own inner colour (FactorColor GFC_Control_Panel_Color_Inner, Modulate): Panel_Tech_Style's tech_panel01. Known techs are green, the one researched and the queued cyan, the others blue, as in the original; they were all blue. - The tech advisor is told when the active player's research changes (a tech clicked, Shift-clicked into the queue, learnt, a new turn), as the original engine calls CvScreensInterface.forceScreenUpdate for it, and redrawn when it comes up (the turns left show at once). A click did choose the tech, but the screen never showed it. - addScrollPanel draws no panel: the engine's GScrollPanel is transparent (Civ4Theme_ScrollPanel.thm, GFC_CF_TRANSPARENT). The techs lie on the advisor's parchment, not the external style's blue; the city screen's right column loses a blue block Wine does not have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the border Measured against the original (BUG + BULL, the new civic popup, 1600 x 900): - Each choice (popupAddGenericButton) is the theme's standard stone button across the window, its text dark with the button's light shadow, 9 in; a line's button is 25 high, 6 apart; the first has the focus rim until the keys choose another. They were plain white text lines. - The theme's GFC_BITMAPSKIN_SIDES_FILL is read: a window border's sides are filled with its colour round the glass, which is drawn inside the border's margin (12, 13, 12, 15). The glass's light top now follows on from the border's, as in the original; it was a hard light band with a darker step. (A pull down's open list keeps its look: its inner skin is drawn under the whole border.) - The window sits where the original's does (rim at 1182, 79). 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>
The city screen lets go of the selected units (so a right click on it orders nothing), and when it closed the game core picked the next unit that waited, or none: the unit the player had before was gone. The units selected when the screen opened are now kept and selected again when it closes (those still there and the player's), as the original keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Esc cancels
With a unit selected and the right button held on another plot, the
original shows the way there and the unit's action buttons for that plot,
those recommended there glowing (a worker: the farm, road, cottage it
should build there; CvUnit::isActionRecommended and
CvGame::canHandleAction read the interface's goto plot). Esc lets go of
the way, and the button's release then orders nothing.
- The goto plot changing marks the action buttons for redrawing, so the
main interface asks again for that plot.
- enableMultiListPulse works: a pulsing button has the original's blue
rim and tint, a little brighter and dimmer a second a beat (measured
in Wine). It shows for the unit's own plot too, as the original's.
- Esc with the right button held cancels the way and the order.
- --keys can move the mouse ("?<x,y>") and hold the right button
("/<x,y>", "\<x,y>"), to test drags through the window's own input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…link) oc4core links the game core through its import library on Windows, where only its exported functions can be called; CvTeam::isHasTech, getResearchProgress, CvPlayer::getQueuePosition, calculateResearchRate and CvGlobals::getNumTechInfos are not (LNK1120 on windows-x64). The research state the tech advisor is told about is now read by oc4screens.researchState through the scripts' CyPlayer and CyTeam, as a string compared each frame. The same values, the same behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…75's where GameFont has none BUG draws its attitude faces, war and peace icons as font cells by their offset from a symbol the DLL names (init.xml, FontUtil.addOffsetSymbol), and only BUG's GameFont_75.tga holds them. The original shows them (BUG's foreign advisor GLANCE tab, its INFO attitudes, the espionage screen, the scoreboard); OpenCiv4 mapped only the DLL's own codes and read GameFont.tga only, so they were blank. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l's height, lines under buttons
Measured against the original (BUG's foreign advisor, Wine at 1600x900):
- A panel's title is drawn over its box, 11 px in, the box 28 px down ("Surplus Resources",
the ACTIVE tab's leaders' names); it was not drawn at all.
- The panels in a vertical panel's flow share its free height (GLANCE, ACTIVE, INFO rows).
- In a row, attachTextGFC texts and 46 px buttons sit in cells at least 46 wide, 18 apart,
in the row's middle (INFO's columns under their headers); BUTTON_SIZE_CUSTOM is as high as
the row (ACTIVE's leaders).
- A label of spaces is as wide as they are, and labels never take the rest of a row (ACTIVE's
" " pushed the leader and the deals out of the row).
- addLineGFC lines are a pixel wide and drawn on their draw control, under the widgets made
after it (RELATIONS: the lines run under the leaders' buttons).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s it As the original (Wine, BUG + BULL): a double click on one's city or its name bar opens the city screen, a single click on the bar selects the city (what it builds in the bottom panel), and a single click on the city's plot is any plot's (its units, else nothing). OpenCiv4 opened the screen on any single click. The single click stays as an OpenCiv4 option, "Open a city with a single click" on the options' OpenCiv4 tab (off; cityOneClick in profile.ini). Clicks carry whether they hit a city's bar, and --keys has "*<x,y>" for a double click. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sabled, pulse The unit's actions and the city's builds (GFC multi lists) were bare pictures with a gold square under the mouse. The original lays the theme's MultiList_Item skins (Civ4/Custom/MultiListItem.tga) over each: a rounded ring in the HUDBorder colour; under the mouse the fill glow added (+57 of 255, with a soft edge just outside the ring); pressed, a blue fill half over it; disabled, everything inside the ring half way to black (not the theme's ItemDisable, a white wash); the recommended action's pulse a ring going from a deep to a light blue every 0.6 s, a blue halo outside and a little blue inside. The buttons are 48 wide, one every 50 (2 apart, across and down). All measured in Wine (BUG + BULL, 1600x900). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… FactorCombine The military advisor (BUG) keeps the DEPLOYMENT tab's map and its panel when it switches to SIT-REP or STRATEGIC ADVANTAGES; in the original the tab's panel, made after them, covers both. OpenCiv4 drew a screen's own minimap over all its widgets: it is now drawn where initMinimap / bringMinimapToFront placed it among them, and left out (with its clicks) when a later panel covers it whole. The covering panel is PANEL_STYLE_MAIN, whose theme layers say FactorCombine = GColorCombine(Modulate, Source): the colour tints, the alpha is the image's own. The theme took the tint's alpha too, so the panel let the map's box and the background show through; it is opaque now, as in Wine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The original draws a help area with no art of its own (CvMainInterface's setHelpTextArea(350, ..., "", ..., 300)) in PANEL_STYLE_HUD_HELP: help_panel.tga tinted HelpBG (69,93,156) at 35 %, the map seen through it, a dark line and a faint blue one at its top and bottom, the text 4 in from its sides, wrapped at the area's minimum width (300). The city screen's area has art (POPUPS_BACKGROUND_TRANSPARENT) and keeps the framed tooltip. The plot's help sits in the same box. Measured in Wine (BUG + BULL, 1600x900): out = 0.65 map + (8,13,19), as the panel gives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt per game They were static locals in runPlay and so outlived the game: a game loaded from the menu began with the last one's. Now they live with runPlay's other state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and ends the mode In INTERFACEMODE_PYTHON_PICK_PLOT a left click did nothing, so a mod other than BUG's dot map stayed in the mode for good. A left click on a plot the scripts can pick (the game core's highlight colour: revealed, canPickPlot) now ends the mode and reports the plot (CvEventReporter::plotPicked, the scripts' onPlotPicked); a right click ends it, as before. Why the original ends it: the shipped mod Gods of Old sets the mode for its prophets and never ends it itself (its CvMainInterface.py, CvEventManager.py onPlotPicked). BUG's dot map editor reads the mouse itself and sets the mode again after each click (CvDotMapOverlayScreen.resetInterfaceMode), later in the same frame, so it stays in the mode as in Wine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…original's Seen in Wine at 1600 x 900 (BUG, map mode): clicking the cut-off Terrains tab selects it and moves the strip one tab, so Bonuses, Terrains and Territory show whole and > turns grey. One click on > or < moves the strip one tab, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de page On Windows, Python 3's text-mode open() uses cp1252, so writing a profile named 東京 raised UnicodeEncodeError (windows-x64 CI, options_other). The files are now opened in binary mode with the text encoded as UTF-8, and read back the same way, under the game's Python 2.7 and the tests' Python 3 alike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al's Selecting a city let go of the selected units and selected them again when its screen closed. The original keeps them: with a warrior selected, CyInterface().selectCity opens Roma's screen and the warrior is still the head of the selection (seen in Wine, BtS 3.19). selectCity now leaves the selection as it is, and the saved list and its restore are gone. The units take no orders under the screen: CvGame::canHandleAction refuses a unit's action while a city is selected (its "XXX hack!"), which also keeps their buttons off the bottom panel, and the screen's clicks already go to the city (CvGame::handleCityScreenPlot*Picked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the city screen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the selected units stay selected under the city screen, the numpad's digits moved them there: the host moves the head unit itself (selectionListMove), past CvGame::canHandleAction, which refuses the units' actions while a city is selected. In the original the numpad does nothing on the city screen opened with a unit selected, and after Esc the unit is still selected and moves (seen in Wine, batch 3). Under the city screen the numpad's digits now do nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y screen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At the start, _applyGraphics sent the profile's options to the host in one try. This bundle's host has no set_city_one_click (it comes with the city double click), so the call failed there and Keep attacker and Quick enemy moves from profile.ini never reached the host until the options screen set them. Each call now has its own try, so a host without one of them still gets the rest. player_options_test: a host without set_city_one_click still gets the options after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on its own Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…faults and Exit The OpenCiv4 tab's panel ran to the bottom of the window, with no line and no buttons under it. It now has the foot the game's own tabs have (CvOptionsScreen.py: a separator, then a centred row with Restore Defaults and Exit). Its options are in a scroll panel above that, as the game's Other tab does, since they don't all fit above the buttons. Restore Defaults on this tab sets OpenCiv4's options (the tab's check boxes and the CivilizationIV.ini numbers) back to a new profile's, saves the profile and sends them to the host. That is what the game's button does for its own tab's options (CvOptionsScreenCallbackInterface: resetOptions for that tab, refresh, saveProfile). The other tabs' options are kept. Exit is the game's own handleExitButtonInput. setText on an edit box now changes the box as shown too: a redraw keeps what was typed into it, so the reset numbers would have been typed over by the old ones. player_options_test: the tab's foot, and Restore Defaults there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d Exit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…faults and Exit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a worker selected and the right button held over another plot, the action buttons showed what the worker could do on its own plot. The glow was already the goto plot's (CvUnit::isActionRecommended reads it), so on a hill the Cottage glowed and no Mine showed. The scripts' action list (ui_actions_to_show, CyInterface().getActionsToShow) and ui_can_handle_action now pass the interface's goto plot to CvGame::canHandleAction, which takes it for the mission plot. Without a held button there is no goto plot, and the core uses the unit's own plot as before. Seen in Wine (BUG + BULL, a worker at 81,71, the right button held without letting go): on a hill, Mine and Windmill; on iron on flat grassland, Mine (glowing); on marble, Quarry (glowing); on its own plot, its own list. The buttons change while the button is still held, before any move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the right button is held Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…original's The city screen's help area is floating (CvMainInterface.py: setHelpTextArea(390, ..., 0, 0, ..., bFloating True, the transparent popup art, ...)). OpenCiv4 ignored bFloating and drew every help at the area's 0, 0, the screen's top-left, over the top bar: the hurry button's at the bottom right showed its help in the far corner. A floating help area now puts the help beside the widget under the mouse. Seen in Wine (BUG + BULL, Roma's city screen at 1600x900, the mouse on the hurry button, Production Automation, a build in the list and a specialist): the box's right edge is at the widget's left, and its top is at the widget's top. When that would run off the screen below, its bottom is at the widget's bottom instead (the hurry button's). It is as wide as its widest line and wraps at about 240 (the hurry help's longest line, 234 wide, then a break before "a Building"). The main interface's help area on the map isn't floating and is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… its widget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # apps/oc4core/Screens.cpp # src/render/MapWindow.cpp # src/render/MapWindow.h # src/render/UiLayer.cpp # src/render/UiLayer.h
… peak and hill The Terrains tab listed every terrain in the XML, the graphical only peak and hill too, so those two showed twice (once more as the plot types). It also ran its four lists together, eight to a row. As in the original, seen in Wine (BUG + BULL, Map Mode's Terrains tab), it now shows four groups, each starting a new row: - the terrains without the graphical only ones (grass, plains, desert, tundra, snow, coast, ocean); - the plot types (peak, hills, flat, water); - the features (ice, jungle, oasis, flood plains, the three forests, fallout); - the routes and the river. TERRAIN_PEAK and TERRAIN_HILL are the ones with bGraphicalOnly 1 (CIV4TerrainInfos.xml); they are the last two, so the other terrains keep their indexes. The other tabs were checked against the Wine pictures (Units, Buildings, Technologies, Improvements, Bonuses) and were already in the original's order and rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iginal's On the player mode's Technologies tab the original frames each tech the player knows in yellow (seen in Wine, BUG + BULL: wine-wb/pl-techs.png). OpenCiv4 marked them with the faint HUD help panel behind the button, which hardly showed. A known tech is now an image check box that is on, the way the World Builder's chosen tool button is drawn (its picture and the yellow frame, as in Wine). The palette reads CyTeam.isHasTech each time it draws, so the frame follows a tech added or taken away with the brush at once (checked: a click on a known tech takes it away and its frame goes). The other lists keep their look: in Wine the units', buildings', terrains' and the rest's chosen item has no frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frame on the techs the player knows was the theme's toggled look, paler and thinner than the original's. It is now the art the original uses for it: the check box's highlight picture BUTTON_HILITE_SQUARE (Art/Interface/Buttons/Button_SELECT.dds, CIV4ArtDefines_Interface.xml), which CvWorldBuilderScreen.py gives its tool buttons' check boxes. Drawn over the tech's button when it is on, it gives the bright yellow glow seen in Wine (BUG + BULL, wine-wb/pl-techs.png). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seen in Wine (BUG + BULL, 2026-11-27, testgames/shots/wine-diplo-trade/w03-w05,
x04): resting the mouse on an item of a trade list shows its help ("Will cause
Mehmed II to Make Peace with Roosevelt." and, for a red item, the leader's
reason) in a tooltip box whose corner is about 1 px left of the mouse and 33
under it. OpenCiv4 put it in the help area at the bottom left. Stacked on
bssth#150 (it holds fix/worldbuilder-help, whose tooltipPlace this extends).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #150 (bundle 6): it extends #150's
tooltipPlace(oc4screens.py), which puts a screen widget's help in a tooltip where the original shows one. Merge after #150; until then this PR also shows #150's commits. The change itself is one commit,34b24704.What it changes
In a talk, resting the mouse on an item of a trade list ("Make Peace With Roosevelt", a red "Stop Trading With Cyrus", ...) shows its help: what the item does and, for a red item, the leader's reason for refusing it.
tooltipPlacereturns that place for the two trade lists (DiploTheirItems,DiploOurItems). Everything else keeps its help where it was.What it is based on
testgames/shots/diplo-trade/, noteswine-notes.md): Mehmed's list, hovering Make Peace With Roosevelt, Stop Trading With Cyrus and Vassal State (wine-diplo-trade/w03–w05), and Roosevelt's list, hovering Adopt Hereditary Rule (x04). The help is a tooltip box under the mouse, the text first and the leader's reason in red under it. The 1 px / 33 px offset was measured on those pictures.CvDLLWidgetData: the item's text, then "<who>:<denial text>" inCOLOR_WARNING_TEXTfor a refused item; the textsTXT_KEY_DENIAL_*fromCIV4DenialInfos.xml). Only where it is drawn changes.How it was checked
strings/dumpbin/objdump), and nothing here comes from someone else's (CONTRIBUTING)ctest --test-dir build\Releasepasses: 23/23 (macOS arm64 build of Bundle 6/6: screens and advisors #150 + this)--turns 100 --map Fractal --size STANDARD --seed 7givesD7D43800at turn 100 on this branch, the same as masterOpenCiv4, scripted on the same save (kit
diplo-trade/oc4run.sh): the same hovers as in Wine, picturestestgames/shots/oc4-diplo-trade/after/w03-hover-peace.pngandx04-hover-civic.png, side by side with Wine's incompare-diplo-trade/(Wine left, OpenCiv4 after right).Pictures (
pr-assetsdiplo-tooltips/):w03-hover-peace.jpg: Make Peace With Roosevelt hovered: the tooltip under the mouse in both, with Mehmed's reason in red.w04-hover-embargo.jpg: Wine, Stop Trading With Cyrus ("We just don't like you enough.").x04-hover-civic.jpgwithafter-x04-hover-civic.jpg: Roosevelt's Adopt Hereditary Rule.Not done / not checked:
🤖 Generated with Claude Code