Peter Nelson
f0376fb46c
Fix 25f1c97bea: Incorrect background colour in badge configuration list. ( #14850 )
...
Provide correct widget colour instead of assuming COLOUR_GREY.
2025-12-08 21:34:41 +05:00
Peter Nelson
cba2d75332
Fix #14844 : Use company colour remap for badges in picker window. ( #14849 )
...
(Except for houses, which are not company-owned.)
2025-12-08 21:34:38 +05:00
Peter Nelson
117d33cf4f
Codechange: Replace drop down list's default bools with DropDownOptions. ( #14837 )
...
Improves maintainability and avoids positional ambiguity.
2025-12-08 21:32:02 +05:00
Peter Nelson
e8134eb0e5
Change: Make picker label/text colours consistent. ( #14829 )
...
Use {GOLD} instead of {ORANGE} in house picker window, to match other picker windows.
2025-12-08 21:31:35 +05:00
Cyprian Klimaszewski
de2a34a1b6
Fix 98700eee43, Fix #14815 : Properly handle picker window invalidation. ( #14816 )
2025-12-08 21:31:04 +05:00
kos
dad1320346
Fix #14755 : Remove clicked type selection when not visible
2025-12-08 20:46:52 +05:00
Peter Nelson
c2d92433c6
Codechange: Use std::initializer_list for NWidgetPart data. ( #14749 )
...
Avoids using C/C++ arrays.
2025-12-08 20:20:01 +05:00
dP
8404c2a7cc
Merge remote-tracking branch 'upstream/master'
2025-09-28 02:33:49 +05:00
Tyler Trahan
8c58fb1efd
Fix: Missing button beeps ( #14470 )
2025-08-05 13:57:45 -04:00
Peter Nelson
614a01907a
Codechange: Make functions for click and confirm beeps. ( #14484 )
...
Avoids repetition.
2025-07-27 21:54:32 +01:00
Peter Nelson
1d67094863
Add: Buttons to change picker preview image height. ( #14373 )
...
Adjusted height is remembered per picker type, but not saved.
2025-06-23 08:24:49 +01:00
Peter Nelson
8901f9adca
Fix #14361 : Removing a badge filter did not clear it. ( #14379 )
2025-06-23 08:24:03 +01:00
Peter Nelson
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
dP
f0f93c68ca
Merge remote-tracking branch 'upstream/master'
2025-06-14 17:01:17 +05:00
Peter Nelson
48764b0fed
Add: Badge dropdown filters to picker window.
2025-06-05 17:55:24 +01:00
Peter Nelson
948ceb3b17
Add: Button to configure badges in build picker window.
2025-05-25 09:13:05 +01:00
dP
df3a6e321f
Merge remote-tracking branch 'upstream/master'
2025-05-14 18:41:13 +05:00
Peter Nelson
394adb654e
Codechange: Move GUI parts of badges to a separate file. ( #14023 )
2025-04-18 17:20:31 +01:00
Peter Nelson
936d78fefc
Codefix: Avoid uppercase characters in variable names. ( #13985 )
2025-04-10 07:19:27 +01:00
Peter Nelson
2909a14374
Codechange: Include table/strings.h in files that use StringIDs.
...
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00
Peter Nelson
bb4ac915ff
Fix 8f14894024: Badge widths were not updated on interface scale change. ( #13630 )
...
Prepare GUI badge class lists in OnInit() method of Windows, so that they handle scaling changes.
2025-02-22 13:29:52 +00:00
Peter Nelson
7a23bfa747
Add: Filter purchase lists by badge text. ( #13588 )
2025-02-17 17:28:26 +00:00
Peter Nelson
8f14894024
Add: NewGRF Badges.
2025-02-16 22:24:25 +00:00
Peter Nelson
f0777737af
Fix #13459 , Fix #13546 : Crash when changing NewGRFs in game with picker window open.
2025-02-13 21:07:37 +00:00
Peter Nelson
71dafdb21e
Codechange: Use EnumBitSet for picker window invalidation flags.
2025-02-13 21:07:37 +00:00
Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +00:00
Rubidium
4099acb946
Codechange: replace BSWAP32/BSWAP16 with std::byteswap
2025-01-28 19:22:12 +01:00
Rubidium
4b2051a1c1
Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf
2025-01-19 23:01:35 +01:00
Rubidium
bfc8ae6c52
Codechange: use accessor for (scrollbar_)index as they are read only
2025-01-04 20:51:47 +01:00
Rubidium
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Rubidium
f0a74fcabb
Codechange: use SetToolTip instead of accessing tool_tip directly
2025-01-03 11:09:49 +01:00
Rubidium
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
dP
a86fd7c621
Update to 15.0-beta1
2024-12-25 20:34:06 +05:00
Peter Nelson
fa1849b855
Codechange: Use std::range::find_if where possible.
2024-11-24 10:36:03 +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
Jonathan G Rennison
3105f6391c
Fix #13002 : Crash due to use of dangling types in picker GUI used/saved lists ( #13008 )
2024-10-20 09:37:17 +01: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
f2f7573c3f
Fix #12668 : Crash opening picker window with filter when no results available. ( #12669 )
...
When first opening the picker window, we attempt to find a valid class and type to select. If the picker window was closed with filters enabled, there may not be anything list that is usable.
Resolve this by using callbacks to find the first usable type when no types are listed.
2024-05-12 20:14:29 +01:00
Peter Nelson
34da94ffc8
Fix: Use widget resize step instead of window resize step. ( #12659 )
...
Build Picker class list filter could be drawn incorrectly depending on how the window can be resized.
2024-05-11 20:51:44 +01:00
Peter Nelson
b30fe0d7da
Feature: Ctrl-click to toggle favourites in build-pickers.
...
This allows ctrl-click on a type in a build-picker window to remember it
as a favourite. An new filter button to show only favourites makes it
simpler to use these types.
Favourite types are saved locally in favs.cfg, so are remembered between
games.
2024-05-11 02:12:41 +01:00
Peter Nelson
fde3b35a24
Feature: New filter to show only used types in build-pickers.
...
This filters the build-picker type lists to only show types that have
already been placed in the current game, making it simpler to get to
build matching features.
2024-05-11 02:12:41 +01:00
Peter Nelson
b76517816e
Feature: Add "All" filter to build-picker show types from all classes.
...
Toggling the "All" filter causes the class selection to be ignored, so
that items from all classes can be displayed together. The class text
filter is still applied.
This makes it easier to search amongst types for a feature.
2024-05-11 02:12:41 +01:00
Peter Nelson
cdc356e7bf
Change: Unify station/waypoint/roadstop/object build-picker window code.
...
These windows now share a common code base for choosing and display class and types.
An additional text filter is added to search types by name instead of just classes.
2024-05-11 02:12:41 +01:00