Rubidium
6d9f30c343
Codefix: prevent matrix overflows on high resolution monitors
2025-01-04 12:18:37 +01:00
Rubidium
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Rubidium
c972a9ae1f
Codechange: remove (unused) tooltip from function to set matrix dimensions
2025-01-03 15:05:10 +01:00
Rubidium
7c1ddd74d5
Codefix: use SetToolTip(..) instead of SetStringTip(STR_NULL, ..)
2025-01-03 14:18:59 +01:00
Rubidium
3196e0709d
Codechange: replace internal SetDataTips with appropriate variants
2025-01-03 11:09:49 +01:00
Rubidium
7c2668d10f
Codechange: replace SetDataTip(0x0, with SetTooltip(
2025-01-02 23:28:43 +01:00
Rubidium
ee3ea57a85
Codechange: replace SetDataTip(RWV_ with SetResizeWidgetTypeTip(RWV_
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
Rubidium
fedfacf472
Codechange: always do StringID + offset, instead of offset + StringID
2025-01-02 17:09:31 +01:00
Peter Nelson
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
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
a951896364
Add: Add cargo transported to industry production graph.
2024-11-22 20:47:51 +00:00
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
598fdf04a4
Codechange: Use vector instead of fixed array for graph data.
2024-11-22 20:47:51 +00:00
Jonathan G Rennison
7b3525954c
Fix: x-axis direction of industry production graph ( #13062 )
2024-11-07 08:13:21 -05:00
Anatoly Eltsov
3fca0cf3ee
Feature: Industry production graph ( #10541 )
2024-10-31 22:35:04 +00: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
Peter Nelson
df1b6a933b
Fix #12764 : Crash when opening Detailed performance rating window with no companies. ( #12765 )
2024-06-07 21:57:18 +01:00
dP
0d1fc47edb
Cleanup: Remove redundant break statement ( #12527 )
2024-04-18 20:54:20 -04: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
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
8d312b305b
Codechange: Replace currency macros with functions. ( #12396 )
2024-03-29 14:49:48 +00:00
Jonathan G Rennison
515303b8be
Fix #12092 : Incorrect x-axis in cargo payment graph window
2024-03-23 13:33:29 +01:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
Peter Nelson
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
912d7bd80e
Codechange: Give ColourShade values names instead of numbers.
2024-02-25 12:38:07 +00:00
Peter Nelson
ae3390fe48
Codechange: Add ColourShade enum.
2024-02-25 12:38:07 +00:00
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
ff618230fe
Codechange: Replace magic value with a variable ( #11980 )
2024-02-04 10:45:24 +00:00
Peter Nelson
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
dce7d5d9b0
Fix #8253 : allow rendering graphs with values over 2**31 / 10 ( #11915 )
2024-02-01 22:53:30 +01:00
Patric Stout
770ca3a624
Fix #8253 : don't use INVALID_DATAPOINT for a valid value ( #11913 )
2024-02-01 22:47:11 +01:00
frosch
68c64d2511
Codechange: Remove TKM string codes by duplicating strings.
2024-01-28 14:44:24 +01:00
frosch
bd3d687bf9
Codechange: Merge all BaseGraphWindow widget enums into one.
...
Previously it relied on some enum entries using the same integer value.
2024-01-28 14:44:24 +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
Rubidium
8faaedeff9
Codechange: replace hand written function to find first/last bit with C++ variant
2024-01-19 21:10:39 +01:00
Rubidium
aa5ba5bd7f
Codechange: allow certain enumeration to be added
...
Otherwise C++20 doesn't like it.
2024-01-16 23:30:23 +01: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
7124b4eef1
Codechange: Use std::unique_ptr for all NWidgets.
2023-12-31 15:33:56 +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
b86182ab84
Codechange: Use std::map to provide indexed widget access.
...
This removes the need to determine the biggest widget index and replaces C-style memory handling.
2023-12-29 18:45:43 +00:00
Peter Nelson
6e8c27b8e5
Change: Hide bevel for resizeable sparse layout windows. ( #11572 )
...
When clicked, the button is still highlighted to show that it is active.
The bevel is controlled with widget_data by RWV_SHOW_BEVEL or RWV_HIDE_BEVEL values.
2023-12-10 17:25:36 +00:00
Peter Nelson
bdef9b451c
Codechange: Remove unnecessary SetMinimalTextLines for text buttons alongside captions. ( #11549 )
2023-12-06 21:14:09 +00:00
Peter Nelson
58c252b81a
Cleanup: Remove unnecessary pressed button offset code.
2023-12-05 21:12:35 +00:00
Peter Nelson
09d01bd015
Fix: Restore original cargo legend 'blob' dimensions. ( #11480 )
...
An off-by-one in a previous life made the 'blob' too narrow.
2023-11-21 19:51:24 +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
bbd64bbe2b
Fix #9545 : Crash when all cargo types are disabled. ( #11432 )
...
This is not a very useful state, but it's nice to not crash.
Some parts of the game don't (yet) check for cargo types being redefined, that is out-of-scope here.
2023-11-04 14:42:47 +00:00