Commit Graph
531 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 549d555be7 Codechange: document a number of parameters and return types 2026-02-18 22:57:05 +01:00
Peter NelsonandGitHub 0e25f9245c Codechange: use PoolID for newgrf class ids (#15228) 2026-02-18 09:11:04 +00:00
Rubidiumandrubidium42 c6c06e13eb Codefix: wrong parameter names and partially missing parameters 2026-02-02 16:31:46 +01:00
Konstantin Gribovandrubidium42 6cac80a158 Change: Add support for next/previous/first/last railtype hotkeys.
This patch adds support for next/prev railtype hotkeys which select
previous next, first or last  available railtype.
If user selected any widget in railway build toolbox it will be
preserved.

Such behaviour is useful for players who use PURR, Useless Tracks,
U&ReRMM and similar NewGRFs for quick selection.

I use PURR with semantic tracks coloring (e.g. white purr for waiting
bays, red purr for prio zones etc).

Current patch binds this feature to `[`, `]`, `CTRL+[` and `CTRL+]`.

Initialy by Konstantin Gribov <grossws@gmail.com>.
2026-01-30 00:00:53 +01:00
Rito12andrubidium42 2de2c5d31d Cleanup: Expose last built types in the toolbar gui header. 2026-01-30 00:00:53 +01:00
Rubidiumandrubidium42 03c24810b1 Codechange: use scoped enums for timer enumerations, rename one enum 2026-01-29 12:42:27 +01:00
Rubidiumandrubidium42 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
mmtunligitandGitHub 2bcbea2694 Feature: User-defined collections of saved items in the picker window (#14813) 2026-01-25 12:38:01 -05:00
Cyprian Klimaszewskiandrubidium42 97f3e5b70f Codechange: Make TileType enum an enum class. 2026-01-24 08:34:05 +01:00
Rito12andrubidium42 859b56a066 Doc: Correct file descriptions to match coding style and doxygen. 2025-12-15 17:31:00 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandPeter Nelson 0f5a4290df Codechange: Use enum class for RailTileType 2025-11-17 20:46:05 +00:00
mmtunligitandGitHub 7662105081 Change: Clamp terraform toolbar to main toolbar (#14725) 2025-11-13 18:25:21 -05:00
Peter NelsonandGitHub 66b6d71e32 Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
2025-11-01 22:33:00 +00:00
Rito12andGitHub 8ea347a811 Remove: Rail type cost from replace vehicle window. (#14748) 2025-10-31 10:26:47 -04:00
Peter NelsonandGitHub f8aa2e64e4 Add: Include build cost in rail/road dropdowns. (#14599) 2025-09-29 19:23:02 +01:00
Peter NelsonandGitHub 5ed8f1203b Codechange: Cleanup unnecessary includes of spritecache.h (#14678) 2025-09-28 17:09:57 +00:00
Peter NelsonandGitHub 1229a498b7 Codechange: Add constant for INVALID_WIDGET. (#14649)
Replaces direct use of -1, making it easier to find.
2025-09-21 21:47:04 +00:00
Tyler TrahanandGitHub 78f7060994 Fix: Standardize "rail waypoint" strings (#14505) 2025-08-10 10:56:33 -04:00
Tyler TrahanandGitHub 8c58fb1efd Fix: Missing button beeps (#14470) 2025-08-05 13:57:45 -04:00
Peter NelsonandGitHub 614a01907a Codechange: Make functions for click and confirm beeps. (#14484)
Avoids repetition.
2025-07-27 21:54:32 +01:00
Peter NelsonandGitHub 8f01ae675e Revert 0853c1979b: Button to toggle showing advanced signal types (#9617) (#14219) 2025-06-24 20:18:08 +02:00
Peter NelsonandGitHub de660cba02 Change: Consistent toolbar sizes with dedicated NWidgetParts. (#14344)
Add SetToolbarSpacerMinimalSize() and SetToolbarMinimalSize() NWidgetParts and use to make toolbar button sizes consistent.
2025-06-08 18:13:47 +00:00
froschandfrosch 0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
Rubidiumandrubidium42 7805c1c189 Codechange: use std::string_view for ini_key 2025-05-01 23:24:43 +02:00
Peter NelsonandGitHub 394adb654e Codechange: Move GUI parts of badges to a separate file. (#14023) 2025-04-18 17:20:31 +01:00
Peter NelsonandGitHub 5008568dfc Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
Peter NelsonandPeter Nelson 47d078c033 Codechange: Use EnumBitSet for RailTypes. 2025-03-25 20:15:48 +00:00
Peter NelsonandGitHub adb20f99ea Fix: Autoreplace rail/road list only listed buildable types. (#13887)
Instead list all possible types which includes hidden types compatible with buildable types.
2025-03-25 08:22:30 +00:00
Peter NelsonandGitHub 79ef4e98fe Codechange: Use std::swap() instead of Swap() (#13883) 2025-03-24 23:47:34 +00:00
Peter NelsonandPeter 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 NelsonandPeter Nelson 761c587940 Codechange: Use std::array to store most-used railtype.
This allows initialisation without memset.
2025-03-09 18:03:50 +00:00
Peter NelsonandPeter Nelson 039b5a2662 Codechange: Move to GetWidgetString for rail windows. 2025-03-03 21:20:14 +00:00
Peter NelsonandGitHub 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
Rubidiumandrubidium42 b376e2655a Codechange: explicitly initialise member variables of Windows 2025-02-27 20:06:06 +01:00
Peter NelsonandPeter Nelson 8f14894024 Add: NewGRF Badges. 2025-02-16 22:24:25 +00:00
Rubidiumandrubidium42 fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidiumandrubidium42 c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter NelsonandPeter Nelson 71dafdb21e Codechange: Use EnumBitSet for picker window invalidation flags. 2025-02-13 21:07:37 +00:00
Peter NelsonandPeter Nelson 2cb9f55183 Codechange: Store EncodedString for tooltip text.
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Peter NelsonandPeter Nelson 28eb5e05c8 Codechange: Use EnumBitSet for NWidContainerFlags. 2025-02-06 19:43:35 +00:00
Peter NelsonandGitHub 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
Peter NelsonandPeter Nelson 40aeedeade Codechange: Use EnumBitSet for callback masks. 2025-01-31 17:08:24 +00:00
Peter NelsonandPeter Nelson d30e8dd1c1 Codechange: Use EnumBitSet for WindowDefaultFlags. 2025-01-30 08:40:42 +00:00
Peter NelsonandGitHub 4397aa3909 Codechange: Make StationType an enum class. (#13339) 2025-01-19 20:53:08 +00:00
Rubidiumandrubidium42 ef87acc1ff Codechange: make STR_NULL the default for all widget construction functions 2025-01-03 23:25:27 +01:00
Rubidiumandrubidium42 7c1ddd74d5 Codefix: use SetToolTip(..) instead of SetStringTip(STR_NULL, ..) 2025-01-03 14:18:59 +01:00
Rubidiumandrubidium42 fb06ddafba Codechange: add and use SetSprite over directly accessing widget_data 2025-01-03 11:13:16 +01:00
Rubidiumandrubidium42 7c2668d10f Codechange: replace SetDataTip(0x0, with SetTooltip( 2025-01-02 23:28:43 +01:00
Rubidiumandrubidium42 e3a5f9b040 Codechange: replace SetDataTip(AWV_ with SetArrowWidgetTypeTip(AWV_ 2025-01-02 23:28:43 +01:00