Rubidium and rubidium42
68a46f460c
Codechange: add some missing parameter and return type documentation
2026-02-16 16:33:41 +01:00
Cyprian Klimaszewski and rubidium42
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Jonathan G Rennison and rubidium42
f0f964577d
Fix 98481ecc: Incorrect parsing of var 6x parameter in NewGRF debug window
2025-11-18 20:21:03 +01:00
Peter Nelson and GitHub
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 and GitHub
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 and frosch
2926179d02
Fix: Restore the behaviour when entering numbers in query windows: clamp integers out of range to the maximum valid value.
2025-05-20 12:57:30 +02:00
Rubidium and rubidium42
02d8ae018c
Codechange: simplify getting the value of a NewGRF property
2025-05-11 13:48:23 +02:00
Peter Nelson and Peter Nelson
e23de03a99
Codechange: Use FlatSet for sprite picker list.
2025-05-05 14:00:38 +01:00
frosch and frosch
8571af9833
Codechange: Turn ZoomLevel into enum class.
2025-05-03 23:21:09 +02:00
frosch and frosch
7055ea0aee
Codechange: Define sequential operators for ZoomLevel.
2025-05-03 23:21:09 +02:00
frosch and frosch
98481ecc01
Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger.
2025-04-29 20:14:56 +02:00
frosch and frosch
cdafc50c94
Codechange: Replace atoi and atoll with ParseInteger.
2025-04-29 20:14:56 +02:00
Peter Nelson and GitHub
5008568dfc
Codechange: Rename CenterBounds to CentreBounds and move to geometry header. ( #14002 )
2025-04-14 23:55:40 +01:00
Peter Nelson and GitHub
3eb89f04b5
Codechange: Use EnumBitSet for QueryStringFlags. ( #13792 )
2025-03-10 18:59:35 +00:00
Peter Nelson and Peter Nelson
d7963f6eb7
Codechange: Drop default widget strings for NewGRF debug window.
2025-03-04 08:23:28 +00:00
Peter Nelson and GitHub
913eadd6b0
Codechange: Use GetWidgetString for NewGRF debug window. ( #13697 )
2025-03-02 12:46:01 +00:00
Peter Nelson and GitHub
57f0ed716e
Codechange: Use parameterised GetString() for drawing NewGRF info. ( #13674 )
2025-02-28 21:05:12 +00:00
Rubidium and rubidium42
c540c2bcf7
Codechange: explicitly initialise member variables of Windows
2025-02-27 19:58:31 +01:00
Peter Nelson and GitHub
370c702549
Add: Show badges in NewGRF debug window. ( #13597 )
2025-02-17 22:15:45 +00:00
Rubidium and rubidium42
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium and rubidium42
70c9f3963c
Codechange: strongly type VehicleID
2025-02-16 14:50:15 +01:00
Rubidium and rubidium42
b0eb8fe4db
Codechange: introduce ConvertibleThroughBase helpers
2025-02-16 14:02:18 +01:00
Peter Nelson and GitHub
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 and Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +00:00
Rubidium and rubidium42
8f72a478f0
Codechange: change 'return existing window' to a template parameter
...
This change is made to make it possible to pass arbitrary other parameters
to the constructor of the window instances.
2025-02-02 15:57:18 +01:00
Peter Nelson and Peter Nelson
40aeedeade
Codechange: Use EnumBitSet for callback masks.
2025-01-31 17:08:24 +00:00
Peter Nelson and GitHub
a252ba3146
Codechange: Modernise NewGRF debug helper definitions. ( #13410 )
...
* Replace pointers and null-terminated lists with spans.
* Replace raw (undeleted) pointer with unique_ptr.
* Replace const char * with string_view.
2025-01-30 18:50:53 +00:00
Peter Nelson and Peter Nelson
56b1e9df1f
Codechange: Use EnumBitSet for FrameFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson and Peter Nelson
d30e8dd1c1
Codechange: Use EnumBitSet for WindowDefaultFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson and GitHub
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Rubidium and rubidium42
4099acb946
Codechange: replace BSWAP32/BSWAP16 with std::byteswap
2025-01-28 19:22:12 +01:00
Rubidium and rubidium42
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Peter Nelson and GitHub
4397aa3909
Codechange: Make StationType an enum class. ( #13339 )
2025-01-19 20:53:08 +00:00
Rubidium and rubidium42
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Rubidium and rubidium42
7c1ddd74d5
Codefix: use SetToolTip(..) instead of SetStringTip(STR_NULL, ..)
2025-01-03 14:18:59 +01:00
Rubidium and rubidium42
ee3ea57a85
Codechange: replace SetDataTip(RWV_ with SetResizeWidgetTypeTip(RWV_
2025-01-02 23:28:43 +01:00
Rubidium and rubidium42
e3a5f9b040
Codechange: replace SetDataTip(AWV_ with SetArrowWidgetTypeTip(AWV_
2025-01-02 23:28:43 +01:00
Rubidium and rubidium42
d8d03212b8
Codechange: replace SetDataTip(SPR_ with SetSpriteTip(STR_
2025-01-02 23:28:43 +01:00
Rubidium and rubidium42
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
Peter Nelson and GitHub
98e980c478
Codechange: WWT_TEXT, WWT_LABEL and WWT_EMPTY don't use colour. ( #13218 )
...
Set colour for these widget types to INVALID_COLOUR to avoid giving the impression that the colour has a purpose.
A runtime exception is added to catch this the existing widget unit test.
2025-01-01 15:38:19 +00:00
Rubidium and rubidium42
14200212b7
Codechange: use std::optional<std::string> over char * for text query results
2024-06-29 16:33:16 +02:00
Peter Nelson and GitHub
55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. ( #12779 )
2024-06-12 23:08:35 +01:00
Peter Nelson and GitHub
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
Loïc Guilloux and GitHub
29ce013eda
Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr ( #12696 )
2024-05-18 17:04:16 +02:00
Peter Nelson and GitHub
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 and rubidium42
1fcf1a136d
Codechange: use single function returning std::span over two functions that return size and begin
2024-04-07 22:02:16 +02:00
Peter Nelson and GitHub
34ba969c74
Change: Display more useful information in sprite aligner than sprite ID. ( #12439 )
...
Sprite IDs are not useful information given they change don't refer to anything outside the loaded game.
Instead, include the filename and nfo line at minimum, and include action A or action 5 sprite replacement information if applicable.
2024-04-06 21:16:02 +01:00
Peter Nelson and Peter Nelson
7572cfd103
Codechange: Redefine ZOOM_LVL so that ZOOM_LVL_NORMAL is 1x zoom.
...
This matches expectations of what normal zoom means.
2024-04-04 22:27:03 +01:00
Peter Nelson and Peter Nelson
3c94e81665
Codechange: Use ZOOM_LVL_MIN to refer to first zoom level.
...
Many uses of ZOOM_LVL_NORMAL actually just want the first zoom level slot, so use ZOOM_LVL_MIN to make this clearer.
2024-04-04 22:27:03 +01:00