Peter Nelson
948ceb3b17
Add: Button to configure badges in build picker window.
2025-05-25 09:13:05 +01: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
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