Peter Nelson and GitHub
8b14faaa40
Codechange: Add version of DrawStringMultiLine that performs clipping test. ( #14189 )
...
Normally DrawStringMultiLine does not perform any clipping, as the return value may be needed if it the text is not drawn.
In some specific cases the height is already known, so it is possible to test for clipping, which can cut down on layouting time for text which won't be visible.
2025-05-02 22:59:55 +01: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
John Taylor and GitHub
069edc1a4b
Fix #13954 : Plotting graphs with limited data to the right. ( #13956 )
2025-04-14 16:57:07 +02:00
7c1649d524
Fix #13955 : Make graphs respect RTL ( #13957 )
...
Co-authored-by: John Taylor <gitea@johntaylor.hu >
Co-authored-by: frosch <frosch@openttd.org >
2025-04-03 21:17:34 +02:00
John Taylor and GitHub
2f36e3e3a1
Fix #13075 , #13893 : Reversed all x-axis labels for company related and industry production graphs in wallclock mode. ( #13894 )
2025-04-02 19:04:49 +02:00
Loïc Guilloux and GitHub
e55f54ce08
Fix #13843 , 015c081c: Don't discard GetString() result ( #13844 )
2025-03-18 17:15:40 +00:00
Peter Nelson and Peter Nelson
015c081cea
Codechange: Move to GetWidgetString for graph window.
2025-03-03 20:54:09 +00:00
Peter Nelson and GitHub
1bd841b896
Codechange: Use parameterised GetString() for graph windows. ( #13683 )
2025-03-01 17:22:18 +00:00
Rubidium and rubidium42
f69968f2bc
Codechange: explicitly initialise member variables of Windows
2025-02-27 12:21:06 +01: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
ab8177ea77
Codechange: strongly type CompanyID
2025-02-16 14:02:18 +01:00
Rubidium and rubidium42
1ffc950e22
Codechange: use prefix operator++ for CompanyID iterations
2025-02-16 14:02:18 +01:00
Rubidium and rubidium42
ec492cb267
Codechange: make CompanyMask a BaseBitSet implementation
2025-02-09 19:24:51 +01:00
Peter Nelson and Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +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
Rubidium and rubidium42
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Rubidium and rubidium42
6d9f30c343
Codefix: prevent matrix overflows on high resolution monitors
2025-01-04 12:18:37 +01: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
c972a9ae1f
Codechange: remove (unused) tooltip from function to set matrix dimensions
2025-01-03 15:05:10 +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
3196e0709d
Codechange: replace internal SetDataTips with appropriate variants
2025-01-03 11:09:49 +01:00
Rubidium and rubidium42
7c2668d10f
Codechange: replace SetDataTip(0x0, with SetTooltip(
2025-01-02 23:28:43 +01:00
Rubidium and rubidium42
ee3ea57a85
Codechange: replace SetDataTip(RWV_ with SetResizeWidgetTypeTip(RWV_
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
Rubidium and rubidium42
fedfacf472
Codechange: always do StringID + offset, instead of offset + StringID
2025-01-02 17:09:31 +01:00
Peter Nelson and GitHub
8dfab2a607
Fix #13225 : Cargo payment graph key toggled wrong data sets. ( #13226 )
...
Cargo payment graph should now be filtered only by CargoID instead of sorted position.
2025-01-01 20:34:55 +00: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
Peter Nelson and Peter Nelson
a951896364
Add: Add cargo transported to industry production graph.
2024-11-22 20:47:51 +00:00
Peter Nelson and Peter Nelson
22035a4f2a
Add: Ability to show and filter different datasets on the same graph.
2024-11-22 20:47:51 +00:00
Peter Nelson and Peter Nelson
598fdf04a4
Codechange: Use vector instead of fixed array for graph data.
2024-11-22 20:47:51 +00:00
Jonathan G Rennison and GitHub
7b3525954c
Fix: x-axis direction of industry production graph ( #13062 )
2024-11-07 08:13:21 -05:00
Anatoly Eltsov and GitHub
3fca0cf3ee
Feature: Industry production graph ( #10541 )
2024-10-31 22:35:04 +00: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
Peter Nelson and GitHub
df1b6a933b
Fix #12764 : Crash when opening Detailed performance rating window with no companies. ( #12765 )
2024-06-07 21:57:18 +01:00
dP and GitHub
0d1fc47edb
Cleanup: Remove redundant break statement ( #12527 )
2024-04-18 20:54:20 -04: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
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 GitHub
8d312b305b
Codechange: Replace currency macros with functions. ( #12396 )
2024-03-29 14:49:48 +00:00
Jonathan G Rennison and rubidium42
515303b8be
Fix #12092 : Incorrect x-axis in cargo payment graph window
2024-03-23 13:33:29 +01:00
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium and rubidium42
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
Peter Nelson and GitHub
d4f0f0e2c5
Codechange: Use GetVisibleRangeIterators() in more places. ( #12190 )
...
This replaces more first/last index calculation, along with indexed array/vector access, with iterator access instead.
2024-02-27 20:10:06 +00:00
Peter Nelson and Peter Nelson
912d7bd80e
Codechange: Give ColourShade values names instead of numbers.
2024-02-25 12:38:07 +00:00
Peter Nelson and Peter Nelson
ae3390fe48
Codechange: Add ColourShade enum.
2024-02-25 12:38:07 +00:00
Peter Nelson and Peter Nelson
0463d4c198
Codechange: Remove direct access to _colour_gradient.
...
Access is now through GetColourGradient, which ensures parameters are in range.
2024-02-25 12:38:07 +00:00
dP and GitHub
ff618230fe
Codechange: Replace magic value with a variable ( #11980 )
2024-02-04 10:45:24 +00:00
Peter Nelson and GitHub
d9461e52af
Fix #11972 : Incorrect minimum width allocated to graph. ( #11974 )
...
Width was based on actual number of data points instead of possible number of data points.
2024-02-04 08:51:19 +00:00
Patric Stout and GitHub
dce7d5d9b0
Fix #8253 : allow rendering graphs with values over 2**31 / 10 ( #11915 )
2024-02-01 22:53:30 +01:00