glx22
7493b2d0c1
Codechange: Add callback to IntSettingDesc to support dynamic min/max
2025-01-05 23:31:50 +01:00
Peter Nelson
b653f875b0
Codechange: Space between `template` and `<` ( #13278 )
...
Make it all consistent so it matches CODINGSTYLE.
2025-01-04 17:56:14 +00:00
Rubidium
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Loïc Guilloux
b3660bf24a
Fix: IntSettingDesc may have a callback for default value ( #13240 )
2025-01-03 15:05:56 +01:00
Rubidium
7c1ddd74d5
Codefix: use SetToolTip(..) instead of SetStringTip(STR_NULL, ..)
2025-01-03 14:18:59 +01:00
Rubidium
7c2668d10f
Codechange: replace SetDataTip(0x0, with SetTooltip(
2025-01-02 23:28:43 +01:00
Rubidium
e3a5f9b040
Codechange: replace SetDataTip(AWV_ with SetArrowWidgetTypeTip(AWV_
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
Peter Nelson
448d6ede4a
Codechange: Use STR_NULL (or {}) instead of literal 0. ( #13222 )
2025-01-01 20:17:20 +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
Rubidium
3956ed086a
Codechange: use Date/Year constructor explicitly
2025-01-01 16:25:32 +01:00
Peter Nelson
0e1002bca6
Codechange: Use _TOOLTIP instead of _TT suffix for tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
3a310f1802
Codechange: Store GRFConfig parameters in a vector. ( #13137 )
...
All GRFConfigs have space allocated for parameters, but only configured GRFConfigs need them.
Using a vector instead means that space is only used when parameters are used.
2024-12-01 15:15:21 +00:00
Peter Nelson
3be0166801
Codechange: Use std::ranges::find where possible.
...
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
2024-11-24 10:36:03 +00:00
Peter Nelson
6e940af08d
Fix #12952 : Incorrect string parameters passed for social plugin titles.
...
When no option is selected (i.e. during SetupSmallestSize), a different string parameter layout was used that did not match the visible layout.
2024-09-19 18:44:23 +01:00
Rubidium
14200212b7
Codechange: use std::optional<std::string> over char * for text query results
2024-06-29 16:33:16 +02:00
merni-ns
0409577277
Add: Setting to disable warning for old vehicles ( #12714 )
2024-06-15 17:14:29 -04: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
0f230244fe
Codechange: [UI] Remove redundant SetMinimalSize for WWT_EDITBOX widgets. ( #12733 )
2024-05-30 08:34:26 +01:00
merni-ns
55a7c59d13
Remove: NPF and pathfinder change settings
2024-05-10 10:38:44 +02:00
Peter Nelson
4740eeaa43
Add: 'Get Content' buttons next to base set dropdowns in Game Options. ( #12627 )
...
This allows base set content to be downloaded more easily, filtered by type and next to where it is set up.
2024-05-05 16:15:35 +01:00
Peter Nelson
9a7c30a109
Codechange: Let ClickSliderWidget handle rounding to nearest mark.
2024-05-03 11:48:36 +01:00
Peter Nelson
9d2efd4c96
Codechange: Use callback function to set labels of slider widget marks.
...
Slider widgets can only use a predefined list of values and strings to draw labels. This makes it difficult to vary the display by context.
Instead of providing a predefined list as a std::map, use a callback function instead. This function can decide what text to display, and can call SetDParam to dynamically set up strings.
2024-05-03 11:48:36 +01:00
André Cheng
ceb0053dd9
Codechange: Correct return type of GetDefaultValueCallback
2024-04-25 20:07:54 +02:00
André Cheng
339b0ea0ff
Change: Show correct default value and unit for vehicle service interval setting
2024-04-25 20:07:54 +02:00
André Cheng
fd80a1ec66
Fix #11345 : Use correct default button value for vehicle service interval setting
2024-04-25 20:07:54 +02:00
Peter Nelson
2114888485
Change: De-template BaseSetTextfileWindow. ( #12536 )
...
The BaseSet type is not needed after the window is constructed, only the filename and name are required, which can be passed as parameters from `ShowBaseSetTextfileWindow()` instead.
This avoids compiling three instances of `BaseSetTextfileWindow`.
2024-04-20 10:30:29 +01:00
Peter Nelson
16eb17418b
Change: Use aspect ratios for some common widgets.
2024-04-19 22:11:16 +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
332cbca36e
Codechange: Pass std::string_view from drivers instead of char *.
2024-04-10 22:02:04 +01: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
eb094a953c
Codefix: Social Plugins widget parts were not constexpr. ( #12443 )
...
Widget lists were made constexpr except these.
2024-04-06 22:32:26 +00:00
Peter Nelson
2047c27445
Codechange: Move drop down list item definitions to separate header.
...
This reduces the scope of the definitions which are no longer needed to create the common lists.
2024-04-01 22:33:16 +01:00
Peter Nelson
56cac21086
Codechange: Use functions to create common drop down list items.
2024-04-01 22:33:16 +01:00
Peter Nelson
d68e5159e1
Feature: Allow base sounds set to be changed mid-game. ( #12399 )
2024-04-01 17:54:42 +01:00
Peter Nelson
d683ec0183
Codechange: Move dropdown and slider out of widgets directory. ( #12403 )
...
Also shuffle headers to place widget includes near end.
This leaves the widgets directory solely for defining Widget IDs.
2024-03-31 19:37:16 +01:00
Peter Nelson
8d312b305b
Codechange: Replace currency macros with functions. ( #12396 )
2024-03-29 14:49:48 +00:00
Rubidium
d09b5aaeba
Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity
2024-03-24 08:30:38 +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
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
Rubidium
4c117dd2d8
Revert #11993 : new number format system does not and cannot work for CJK languages
...
There are too many intricacies that I am unaware of that are popping up after
asking whether things are right or not.
I do not want to keep playing whack-a-mole, so just revert the whole thing.
This reverts:
15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
2024-02-22 20:40:12 +01:00
Rubidium
15be383b93
Fix a253205: remove (now) unused currency separator
2024-02-18 16:56:52 +01:00
Patric Stout
839f2e025c
Fix: visually also disable vsync when not using HW acceleration ( #12066 )
2024-02-12 03:19:08 +01:00
Patric Stout
849fd5ae03
Change: [Script] replace easy/medium/hard values with default value ( #11959 )
2024-02-03 09:15:03 +00:00
Tyler Trahan
41f2eed425
Feature: Settings to scale cargo production of towns and industries ( #10606 )
2024-01-30 15:11:46 -05:00