Peter Nelson
4389321623
Codechange: Use parameterised GetString() for cheat window.
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
Rubidium
ab8177ea77
Codechange: strongly type CompanyID
2025-02-16 14:02:18 +01:00
Peter Nelson
2d7d085e8e
Codechange: Use EncodedString for error messages. ( #13569 )
2025-02-16 10:04:32 +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
Peter Nelson
d9bb002cac
Codechange: Use local parameters for formatting settings values. ( #13487 )
2025-02-07 20:18:03 +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
c4c5028862
Codechange: Use EnumBitSet for SettingFlags. ( #13429 )
2025-02-01 15:46:51 +00:00
Peter Nelson
d30e8dd1c1
Codechange: Use EnumBitSet for WindowDefaultFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson
efb05396a7
Codechange: Use EnumBitSet for WindowFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Peter Nelson
3edf19a2c5
Add: Sandbox settings to Sandbox Options window. ( #13268 )
2025-01-14 21:22:19 +00:00
Rubidium
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
Rubidium
3956ed086a
Codechange: use Date/Year constructor explicitly
2025-01-01 16:25:32 +01:00
SamuXarick
10e2d1ca36
Codechange: Use Map::Iterate() to iterate tiles
2024-12-06 10:33:11 +10:00
Peter Nelson
0446123194
Change: Show company finances column if it has any values in it. ( #13112 )
...
This solves finances not being show if the company inauguration date is in the future.
Current period is now always shown in the same position instead of moving for the first 2 years.
2024-11-24 11:59:30 +00:00
Rubidium
14200212b7
Codechange: use std::optional<std::string> over char * for text query results
2024-06-29 16:33:16 +02:00
Peter Nelson
55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. ( #12779 )
2024-06-12 23:08:35 +01:00
Peter Nelson
4cf6d1dd79
Codechange: Pass WindowDesc by reference instead of pointer. ( #12771 )
...
WindowDesc as passed to Windows is not optional so don't allow to it to be nullptr.
2024-06-11 08:58:03 +01:00
Rubidium
4f2412a272
Codechange: range based for loops instead of C-style for loops
2024-04-11 07:05:04 +02:00
Peter Nelson
de4e00c93f
Codechange: Pass by reference to UpdateWidgetSize. ( #12457 )
...
These parameters are always provided and not optional.
2024-04-09 08:34:45 +01:00
Rubidium
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
Jonathan G Rennison
ca146c8ddd
Fix #12145 : Incorrect date handling in date cheat in wallclock time-keeping mode
2024-02-21 18:43:05 +01:00
Peter Nelson
435d48e182
Fix: Sandbox window does not reduce height when interface scale is reduced. ( #11924 )
...
line_height was only ever made larger, and icon.height ignored.
2024-01-29 22:01:22 +00:00
Patric Stout
80ebcc72fb
Change: rebrand Cheats as Sandbox Options ( #11874 )
2024-01-26 19:56:01 +01:00
Tyler Trahan
fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units ( #11341 )
2024-01-23 11:36:09 -05:00
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
2024-01-16 21:57:05 +00:00
Peter Nelson
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
2023-12-30 00:23:57 +00:00
Peter Nelson
33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. ( #11637 )
2023-12-28 21:34:08 +00:00
Peter Nelson
c18a1494b7
Codechange: Remove FONT_HEIGHT_... macros. ( #11481 )
...
These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
2023-11-21 19:04:24 +00:00
Peter Nelson
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
2023-11-02 22:25:01 +00:00
Tyler Trahan
2dd2910ab3
Feature: Cheat to fix station ratings at 100% ( #11346 )
2023-10-21 08:35:52 -04:00
frosch
b5885295f0
Codechange: Use parameters, which should be used.
2023-09-19 22:49:59 +02:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
2023-09-10 08:40:25 -04:00
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +01:00
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
2023-08-12 18:14:21 +00:00
Tyler Trahan
6f057cbe6a
Codechange: Use proper date type in ClickChangeDateCheat ( #11176 )
2023-08-11 07:52:59 -04:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
PeterN
7e3646cf46
Codechange: Remove redundant char buffer. ( #10808 )
2023-05-11 21:36:11 +00:00
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
2023-05-04 13:14:12 +00:00
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
2023-04-26 07:14:03 -04:00
Tyler Trahan
2f495c015a
Fix 7c6bf97: Don't change date and shift dates in the wrong order ( #10711 )
2023-04-24 17:33:03 +00:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Tyler Trahan
7c6bf977e0
Cleanup: Fix and add comments to date cheat callback ( #10699 )
2023-04-23 21:20:56 +02:00
rubidium42
b19f42ecd9
Codechange: Replace some p1/p2 parameter names with better names ( #10658 )
2023-04-15 15:11:41 +02:00
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
2023-04-15 13:58:55 +02:00
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2023-02-26 21:28:30 +01:00