Commit Graph

199 Commits

Author SHA1 Message Date
Rubidium 5a6469ad6f Codechange: make EventState a scoped enum 2026-06-15 11:20:52 +02:00
Rubidium d519cad60f Codechange: remove unused path in DrawSortButton and simplify calling 2026-06-14 20:30:16 +02:00
Rubidium 8bac7bd519 Codechange: make SwitchMode a scoped enum 2026-05-31 07:22:11 +02:00
Rubidium 2ff631caa2 Codechange: make GameMode a scoped enum 2026-05-30 23:20:20 +02:00
Peter Nelson fce33c5015 Codechange: make WarningLevel a scoped enum (#15622) 2026-05-26 17:12:21 +01:00
Rubidium bcda4a72ee Codechange: make WindowClass a scoped enum 2026-05-20 21:39:04 +02:00
Rubidium c59d64c132 Codechange: separate TextColour enumeration and flags 2026-05-18 08:37:42 +02:00
Peter Nelson 7e624beadc Codechange: make Shade a scoped enum (#15571)
Renamed from `ColourShade` to `Shade` for brevity.
2026-05-03 15:07:29 +01:00
Jonathan G Rennison 89174e891a Codechange: typedef for EnumClassIndexContainer with std::array (#15548) 2026-04-30 14:59:10 -04:00
Rubidium 99c8a637b4 Codechange: make WindowPosition a scoped enum 2026-04-25 17:15:18 +02:00
Rubidium 3b5d46e0bb Codechange: make Colours a scoped enum 2026-04-19 20:53:52 +02:00
Rubidium 7434052eb6 Codechange: make FontSize a scoped enum 2026-04-12 18:10:34 +02:00
Peter Nelson f5061df387 Codechange: make ContentType a scoped enum (#15458) 2026-04-12 13:41:07 +01:00
Peter Nelson 5aae8e2d64 Codechange: make Subdirectory a scoped enum 2026-04-05 21:46:07 +01:00
Peter Nelson 93a6aa77c6 Codechange: make SaveLoadOperation a scoped enum 2026-04-05 21:46:07 +01:00
Peter Nelson 04f7adb7b7 Codechange: make DetailedFileType a scoped enum 2026-04-05 21:46:07 +01:00
Peter Nelson 74b0b080e7 Codechange: make AbstractFileType a scoped enum 2026-04-05 21:46:07 +01:00
Peter Nelson 0b29a2560a Codechange: make GRFStatus, GRFListCompatibility and GRFParameterType scoped enums (#15426) 2026-04-05 16:41:56 +01:00
Rubidium cd4fb5dea3 Codechange: simplify the FiosItem sorter logic 2026-04-03 21:40:57 +02:00
Cyprian Klimaszewski 21bee91fa7 Codechange: Make some variables and constants documentation comments recognised by doxygen. 2026-02-21 15:05:13 +01:00
Rubidium 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Loïc Guilloux 6e356eb267 Fix #15160: Use savegame landscape to display company names in SaveLoad window (#15161) 2026-01-24 19:53:30 +01:00
Cyprian Klimaszewski 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00: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 31eec7106b Codechange: Use Rect WithX/WithY in some places. 2025-09-28 00:31:23 +01:00
Kuhnovic 262c364a28 Fix #14620: Use full file path when deleting files. (#14623) 2025-09-17 21:43:22 +02:00
Kuhnovic 7d252ff7fc Change: Ask for confirmation before deleting a savegame / scenario / heightmap. (#14621) 2025-09-15 13:14:56 +02:00
Peter Nelson e6323e6760 Fix: File/directory titles not updated if language is changed. (#14542) 2025-08-28 17:42:00 +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
frosch d00196cd65 Change: Rearrange buttons in the intro screen, remove unnecessary ones. 2025-05-07 18:41:48 +02:00
Peter Nelson b87ce9c845 Change: Draw info headers as shade of window colour instead of pixel colour. (#14123)
Use the normal or lightest colour gradient to pick a suitable colour, instead of an arbitrary pixel colour.

(Except for the NewGRF window's info panel, this happens to be the same colour.)
2025-04-26 22:38:24 +01:00
frosch 26db4ccf09 Codechange: Turn bit-stuffed FiosType enum into a struct. (#14019) 2025-04-18 15:20:55 +02:00
Peter Nelson 7f3820fa7e Codechange: Load check data is only interested in landscape and starting_year. 2025-03-26 10:54:11 +00:00
Peter Nelson 937fb12d9a Codechange: Use parameterised GetString() for file windows. 2025-03-02 07:29:25 +00:00
Rubidium 0afae7c546 Codechange: explicitly initialise member variables of Windows 2025-02-23 14:53:42 +01:00
Peter Nelson 2d7d085e8e Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Peter Nelson 6cf7a899e9 Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
Peter Nelson 984da2455b Codechange: Use EncodedString for Query window. (#13528)
This removes the need to separately capture and store global parameters.
2025-02-11 17:30:16 +00:00
Peter Nelson 28eb5e05c8 Codechange: Use EnumBitSet for NWidContainerFlags. 2025-02-06 19:43:35 +00:00
Peter Nelson 59354576d4 Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436) 2025-02-01 23:09:18 +00:00
Peter Nelson 5664b1e2f6 Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
2025-01-31 17:09:09 +00:00
Peter Nelson d30e8dd1c1 Codechange: Use EnumBitSet for WindowDefaultFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson f6ab2b69c6 Codechange: Define GRFConfigList alias and pass by reference. (#13358)
This adds the distinction between a single GRFConfig and a GRFConfig list, and simplifies how GRFConfig lists are passed to various functions.
2025-01-22 22:30:32 +00:00
Rubidium 4b2051a1c1 Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf 2025-01-19 23:01:35 +01:00
Rubidium ef87acc1ff Codechange: make STR_NULL the default for all widget construction functions 2025-01-03 23:25:27 +01:00
Rubidium b60101853c Codechange: add and use SetString over directly accessing widget_data 2025-01-03 12:14:55 +01:00
Rubidium 9ac1bad480 Codechange: add and use GetString over directly accessing widget_data 2025-01-03 11:11:01 +01:00
Rubidium 7c2668d10f Codechange: replace SetDataTip(0x0, with SetTooltip( 2025-01-02 23:28:43 +01:00
Rubidium d8d03212b8 Codechange: replace SetDataTip(SPR_ with SetSpriteTip(STR_ 2025-01-02 23:28:43 +01:00
Rubidium 4bf36e3fa6 Codechange: replace SetDataTip(STR_ with SetStringTip(STR_ 2025-01-02 23:28:43 +01:00