Peter Nelson
f1e831233a
Codefix: Mark destructors override. ( #14925 )
...
Remove some empty destructors.
2025-12-19 18:14:29 +00:00
Cyprian Klimaszewski
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson
046b0c6267
Codechange: Use enum class and EnumBitSet for various order flags. ( #14783 )
2025-12-06 12:29:11 +00:00
mmtunligit
e96f35cda9
Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons ( #14831 )
2025-12-01 11:43:48 -05:00
Peter Nelson
66b6d71e32
Codechange: Use std::initializer_list for NWidgetPart data. ( #14749 )
...
Avoids using C/C++ arrays.
2025-11-01 22:33:00 +00:00
Peter Nelson
5ed8f1203b
Codechange: Cleanup unnecessary includes of spritecache.h ( #14678 )
2025-09-28 17:09:57 +00:00
Peter Nelson
31eec7106b
Codechange: Use Rect WithX/WithY in some places.
2025-09-28 00:31:23 +01:00
Michael Lutz
3ac1a2f1e4
Codechange: Store the rail type of rail engines as a RailTypes bitmask.
2025-09-14 17:11:26 +02:00
Michael Lutz
0715903b24
Codechange: Use an enum for vehicle acceleration model.
2025-09-14 17:11:26 +02:00
Peter Nelson
8d96ea1a5e
Fix #14584 : Crash due to drawing non-existent orders of new vehicle. ( #14585 )
...
When the vehicle list window is grouped by orders, no check was made that vehicle's order list existed.
2025-09-04 02:18:26 +00:00
Rubidium
4fb749886a
Codefix: typos in variable/constant/function names
2025-08-31 10:30:37 +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
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
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
Peter Nelson
0455627d16
Codechange: Move ownership of Orders to OrderList. ( #13948 )
...
Removes the orders pool, and orders are now stored directly in each OrderList.
Iterating orders now no longer needs to traverse a linked-list, all orders in an OrderList are sequential.
2025-05-23 10:36:28 +01:00
Peter Nelson
ce83f583bc
Codechange: Use EnumBitSet for VehicleRailFlags. ( #14280 )
2025-05-19 18:56:45 +01:00
frosch
c6fa5022cb
Add: [NewGRF] All callbacks returning D0xx strings, have now the option to return any string id via register 0x100.
2025-05-09 12:39:11 +02:00
frosch
61cec33be2
Codechange: Add 'const' to static variables, which are only initialised once.
2025-05-06 18:29:41 +02:00
Peter Nelson
3e608b5fe4
Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport. ( #14209 )
2025-05-04 14:16:05 +01:00
frosch
8571af9833
Codechange: Turn ZoomLevel into enum class.
2025-05-03 23:21:09 +02:00
Peter Nelson
d958d50985
Fix: Small order list arrow was wrong direction for RTL text. ( #14174 )
...
Add sprite for small left arrow and use for small order list when using an RTL language.
2025-05-01 22:08:24 +01:00
Peter Nelson
5008568dfc
Codechange: Rename CenterBounds to CentreBounds and move to geometry header. ( #14002 )
2025-04-14 23:55:40 +01:00
frosch
ae51308615
Codechange: Remove unused extern declarations.
2025-04-11 22:11:28 +02:00
Peter Nelson
2909a14374
Codechange: Include table/strings.h in files that use StringIDs.
...
Be consistent with how and where the file is incldued.
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
c905472650
Codechange: Use std::array for vehicle sorting/grouping options to remove MemSetT.
2025-03-15 20:09:38 +00:00
Peter Nelson
8b39b23d2b
Codechange: Use EnumBitSet for VehicleFlags. ( #13793 )
2025-03-13 08:38:54 +00:00
Peter Nelson
3eb89f04b5
Codechange: Use EnumBitSet for QueryStringFlags. ( #13792 )
2025-03-10 18:59:35 +00:00
Peter Nelson
91d22f7617
Codechange: Use EnumBitSet for VehStates. ( #13755 )
...
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Peter Nelson
274b7a0195
Fix #13645 : "Follow vehicle" button not raised when following stopped. ( #13746 )
2025-03-06 00:00:57 +00:00
Peter Nelson
e1f9159b51
Codechange: Move to GetWidgetString for vehicle windows.
2025-03-03 21:24:18 +00:00
Rubidium
fd8c33d051
Codechange: explicitly initialise member variables of Windows
2025-02-27 21:19:28 +01:00
Peter Nelson
24d327a30b
Codechange: Use parameterised-GetString for vehicle related windows.
2025-02-22 10:33:22 +00:00
Rubidium
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium
59df0ff496
Codechange: strongly type StationID
2025-02-16 18:25:51 +01:00
Rubidium
70c9f3963c
Codechange: strongly type VehicleID
2025-02-16 14:50:15 +01:00
Rubidium
7e04651220
Codechange: strongly type EngineID
2025-02-16 14:50:15 +01:00
Rubidium
2cb59b1856
Codechange: make VehicleID an enum
2025-02-16 14:50:15 +01:00
Rubidium
ab8177ea77
Codechange: strongly type CompanyID
2025-02-16 14:02:18 +01:00
Peter Nelson
20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. ( #13551 )
...
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00
Rubidium
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson
7c1898eaf1
Codechange: Store EncodedString for text effects.
...
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Peter Nelson
2cb9f55183
Codechange: Store EncodedString for tooltip text.
...
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Rubidium
ce07ea00b8
Codechange: add and use GetDepotDestinationIndex map accessor
2025-02-09 14:27:51 +01:00
Rubidium
ac54ff368c
Codechange: set VLI.index through accessor function
2025-02-08 10:09:02 +01:00
Rubidium
4e84d032b8
Codechange: read VLI.index through wrapper to get the right type
2025-02-08 10:09:02 +01:00
Peter Nelson
d61b376998
Codechange: Use EnumBitSet for CargoClasses. ( #13491 )
2025-02-08 08:46:38 +00:00
Rubidium
04d53ed6f5
Codechange: remove operator!=s that are synthesized
2025-02-08 06:37:36 +01: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