Commit Graph

518 Commits

Author SHA1 Message Date
Cyprian Klimaszewski
add6521abd Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-08 22:26:18 +05:00
mmtunligit
3d28f90311 Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons (#14831) 2025-12-08 21:33:48 +05:00
Peter Nelson
117d33cf4f Codechange: Replace drop down list's default bools with DropDownOptions. (#14837)
Improves maintainability and avoids positional ambiguity.
2025-12-08 21:32:02 +05:00
Richard Wheeler
18649c800b Fix: Bridge deck sprites were not toyland aware (#14821) 2025-12-08 21:29:33 +05:00
Peter Nelson
c2d92433c6 Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
2025-12-08 20:20:01 +05:00
dP
18460f24a7 Merge branch 'v14' 2025-10-17 22:30:58 +05:00
dP
f149f369a1 Store tool handlers as shared pointers 2025-10-08 16:45:14 +05:00
dP
8404c2a7cc Merge remote-tracking branch 'upstream/master' 2025-09-28 02:33:49 +05:00
dP
3386f8caff Merge branch 'v14' 2025-09-04 23:08:10 +05:00
Rubidium
7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Rubidium
da8422a656 Codefix: typos in string names 2025-08-31 10:30:37 +02:00
Loïc Guilloux
fac55d0278 Fix #14506, aac3a5b6: Restore prefilling of _stations_nearby_list (#14551) 2025-08-30 21:11:09 +02:00
Peter Nelson
6eb5c166dc Fix: Account for both text and icon size in station waiting cargo display. (#14535) 2025-08-25 15:15:10 +01:00
kojonek2
aac3a5b683 Fix #12900: Join station window will be shown for stations with existing stations in tile gaps 2025-08-02 20:37:02 +02:00
Peter Nelson
8e2df7809b Codechange: Add distinct type to hold pixel drawing colour. (#14457)
This is used for individual pixels as well as line drawing.
2025-07-20 22:57:55 +01:00
dP
860cf98042 Use new tool highlight for station coverage button 2025-07-10 15:30:48 +05:00
dP
feb4e68df5 Merge branch 'v14' 2025-06-28 02:22:55 +05:00
dP
0fe7c3635c Fix compilation errors after the merge 2025-06-27 18:03:03 +05:00
dP
b2737fe293 Reimplement station building previews 2025-06-26 18:24:01 +05:00
dP
0b76fe1692 Partially fix station cargo acceptance/supply (without update) 2025-06-19 16:09:31 +05:00
Peter Nelson
e4cf6ca0ba Fix: Mis-sized widgets due to missing widget fill. (#14370)
In most places where we calculate and set widget resize step we neglect
to set widget fill step to match. Initial widget sizing uses fill step
instead of resize step, which means the initial size may not be a
multiple of the resize step as intended. In particular this will cause
WWT_MATRIX to be misrendered.

Whether or not this matters depends on the widget type being resized and
the window layout, however for consistency always set fill step to the
same as resize step when calculating.
2025-06-17 17:40:11 +01:00
dP
f0f93c68ca Merge remote-tracking branch 'upstream/master' 2025-06-14 17:01:17 +05:00
Peter Nelson
2e78c24ba3 Codefix: Use bitset .None() or .Any() instead of comparing against an empty bitset. (#14327) 2025-06-04 07:31:44 +01:00
Peter Nelson
984d864c72 Codechange: Add OnClick handler for dropdown items.
This allows each dropdown item to indicate if something different should happen depending on where in the item was clicked.
2025-05-25 09:13:05 +01:00
dP
df3a6e321f Merge remote-tracking branch 'upstream/master' 2025-05-14 18:41:13 +05:00
Peter Nelson
c50ee282f9 Codechange: EnumBitSet bits can be iterated directly. 2025-05-14 07:22:12 +01:00
Peter Nelson
932dca927b Fix: Crash/Undefined behaviour in station view window. (#14183)
No column limit was applied when drawing waiting cargo, which could cause out-of-bounds array access.
2025-05-02 08:02:35 +01:00
Rubidium
855377191e Codechange: replace some more char*s with std::string_view 2025-04-30 23:49:06 +02:00
Peter Nelson
d028c7f9e2 Codefix: Incorrect type for OnDropdownSelect widget parameter. (#14074) 2025-04-22 22:44:25 +01:00
frosch
b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
Peter Nelson
6ea10edef8 Codechange: Use std::unique_ptrs for handling station cargo display. (#14009)
Replaces manual management of raw pointers.
2025-04-16 19:43:45 +01:00
Peter Nelson
b96b26ef15 Codechange: Rename short CargoType parameters cargo. (#13848)
Rename CargoType variables and parameters using short or meaningless names.
2025-03-24 18:18:21 +00:00
Peter Nelson
3503082f19 Codechange: Move template class implementation includes.
These are now placed at the bottom of the including files include list.
2025-03-21 12:53:40 +00:00
Peter Nelson
89948b941b Codechange: Use emplace_back instead of push_back. (#13855) 2025-03-20 17:39:10 +00:00
Peter Nelson
3eb89f04b5 Codechange: Use EnumBitSet for QueryStringFlags. (#13792) 2025-03-10 18:59:35 +00:00
Peter Nelson
92fa1b4444 Codechange: Move to GetWidgetString for station windows. 2025-03-03 21:23:13 +00:00
Peter Nelson
78aebfc693 Codechange: Use parameterised GetString() for station view. (#13692) 2025-03-01 23:04:51 +00:00
Peter Nelson
6d2f17b92f Codechange: Use parameterised GetString() for various build windows. (#13676) 2025-03-01 11:08:46 +00:00
Peter Nelson
e2c1b9f03e Codechange: Use only raw strings in drop down lists. (#13667)
Strings with parameters are now pre-formatted, avoiding global parameters.

Helper functions still allow StringID.
2025-02-27 21:11:16 +00:00
Rubidium
b376e2655a Codechange: explicitly initialise member variables of Windows 2025-02-27 20:06:06 +01:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Peter Nelson
f309b90a1d Codechange: Use EnumBitSet for Airport blocks. 2025-02-13 22:02:02 +00:00
Peter Nelson
75387b9e2b Codechange: Use EnumBitSet for StationFacility. 2025-02-13 18:03:13 +00:00
Peter Nelson
d61b376998 Codechange: Use EnumBitSet for CargoClasses. (#13491) 2025-02-08 08:46:38 +00:00
Peter Nelson
c3643e3ee0 Codechange: Pass raw string to editable query window. (#13481)
This avoids separating string id and parameters. EncodedString is not needed as it is the raw text that is editable.
2025-02-07 17:03:53 +00:00
Peter Nelson
28eb5e05c8 Codechange: Use EnumBitSet for NWidContainerFlags. 2025-02-06 19:43:35 +00:00
Rubidium
6f8b9fc737 Codechange: remove unneeded casts 2025-02-02 19:45:17 +01:00
Rubidium
9bfddcdbbe Codechange: make WindowNumber accept ConvertibleThroughBase types 2025-02-02 19:45:17 +01:00
Peter Nelson
fb55ab0742 Codechange: Pass rect to DrawStationCoverageAreaText. (#13442)
This moves the overflow behaviour to the callers, making it clearer why that is desired.
2025-02-02 17:15:47 +00:00
Rubidium
5a78bb8fac Codechange: ToWindowNumber describes better what is the intent than Pack 2025-02-02 15:57:18 +01:00