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
Rubidium and rubidium42
7805c1c189
Codechange: use std::string_view for ini_key
2025-05-01 23:24:43 +02:00
frosch and frosch
cdafc50c94
Codechange: Replace atoi and atoll with ParseInteger.
2025-04-29 20:14:56 +02:00
Rubidium and rubidium42
78250c3bba
Codechange: remove const char* overloads when there are std::string_view and std::string& overloads
2025-04-29 10:14:53 +02:00
frosch and GitHub
55fad9c78a
Add: Limit height of settings description, and add scrollbar. ( #14102 )
2025-04-26 22:34:18 +02:00
frosch and GitHub
4a09860c53
Fix: Focus settings filter box (only) when the tab becomes active. ( #14100 )
2025-04-25 12:04:26 +02:00
Peter Nelson and GitHub
8b927220c7
Change: Move Game Options toggles to before label, add Off/On text. ( #14097 )
2025-04-25 07:49:33 +01:00
Peter Nelson and GitHub
c0cd7cafe4
Change: Remove minimum width from advanced settings panel of Game Options window. ( #14088 )
...
Previous minimum width of 400 was fairly arbitrary and isn't necessary when
the minimum size is suitably constrained by other widgets in the window.
This allows the window to be narrower for CJK languages.
2025-04-23 23:39:35 +00:00
Peter Nelson and Peter Nelson
78d3eaf3e2
Change: Slider widget can now be colourful.
2025-04-23 19:07:52 +01:00
Peter Nelson and Peter Nelson
20738865f0
Change: Use standard mauve/yellow scheme for game options window.
...
This is the colour scheme used by AI/GS settings, NewGRF settings and (previously) advanced settings.
2025-04-23 19:07:52 +01:00
Peter Nelson and Peter Nelson
7953a97cbb
Change: Adjust section names in Graphics options tab.
...
"Interface size" and "Graphics" section names do not make much sense any more.
2025-04-23 19:07:52 +01:00
Peter Nelson and Peter Nelson
77da79a052
Codechange: Remove unnecessary SetMinimalSize from Game Options window.
2025-04-23 19:07:52 +01:00
Peter Nelson and Peter Nelson
a4dc7249ee
Change: Merge Game Options and Game Settings together.
...
Game Settings is now an additional 'Advanced' tab in the Game Options window.
2025-04-23 19:07:52 +01:00
Peter Nelson and GitHub
12118b201c
Change: Enhance visibility of disabled bool button. ( #14071 )
...
Apply masked fill to background as well.
2025-04-22 17:37:30 +01:00
frosch and GitHub
2a62eea005
Codefix: Comment style. ( #14064 )
2025-04-21 17:25:09 +02:00
Peter Nelson and Peter Nelson
5b2754fdee
Change: Use standard boolean toggle buttons for game options toggles.
2025-04-21 16:23:11 +01:00
Peter Nelson and Peter Nelson
e3d2d68bd4
Change: Draw boolean toggle as a slider widget.
...
This improves usability as the slider position indicates the state instead of a red/green colour change.
2025-04-21 16:23:11 +01:00
frosch and frosch
c9c9973884
Codechange: Rename _circle_size to _setting_circle_size.
2025-04-11 22:11:28 +02:00
Peter Nelson and GitHub
936d78fefc
Codefix: Avoid uppercase characters in variable names. ( #13985 )
2025-04-10 07:19:27 +01:00
Peter Nelson and Peter Nelson
6914d99778
Codechange: Split baseset type definitions into separate files.
2025-03-27 18:57:53 +00:00
Peter Nelson and Peter Nelson
3503082f19
Codechange: Move template class implementation includes.
...
These are now placed at the bottom of the including files include list.
2025-03-21 12:53:40 +00:00
Peter Nelson and 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 and Peter Nelson
edb101d12f
Codechange: Use free function get BaseSet list label.
...
This avoids using StringIDs in a header file.
2025-03-21 12:53:40 +00:00
Peter Nelson and GitHub
3eb89f04b5
Codechange: Use EnumBitSet for QueryStringFlags. ( #13792 )
2025-03-10 18:59:35 +00:00
Peter Nelson and Peter Nelson
a1bcfb836a
Codechange: Remove leftover SetStringTips.
2025-03-04 08:23:28 +00:00
Peter Nelson and Peter Nelson
3d253a9702
Codechange: Move to GetWidgetString for settings windows.
2025-03-03 21:23:13 +00:00
Peter Nelson and GitHub
382d30dbb2
Codechange: Use parameterised GetString() for settings window. ( #13695 )
2025-03-02 07:29:00 +00:00
Peter Nelson and GitHub
e2c1b9f03e
Codechange: Use only raw strings in drop down lists. ( #13667 )
...
Strings with parameters are now pre-formatted, avoiding global parameters.
Helper functions still allow StringID.
2025-02-27 21:11:16 +00:00
Rubidium and rubidium42
b376e2655a
Codechange: explicitly initialise member variables of Windows
2025-02-27 20:06:06 +01:00
Peter Nelson and GitHub
f10ece41f8
Codechange: Split SettingEntry-related code to own file. ( #13663 )
2025-02-26 19:50:02 +00:00
Peter Nelson and GitHub
4ac81656ee
Codechange: Simplify some calls to DrawStringMultiLine(). ( #13643 )
...
Sometimes the bottom is passed as UINT16_MAX for no reason. In this case just pass the rect.
Other times it's to extend the window height; in that case just extend the rect itself.
2025-02-22 20:41:40 +00:00
Rubidium and rubidium42
5cee804f98
Codechange: remove ZeroedMemoryAllocator from NWidgetBase
2025-02-22 14:38:33 +01:00
Peter Nelson and GitHub
2b80812922
Codechange: Use parameterised GetString() in network-related windows. ( #13635 )
2025-02-22 13:16:47 +00:00
Peter Nelson and GitHub
2d7d085e8e
Codechange: Use EncodedString for error messages. ( #13569 )
2025-02-16 10:04:32 +00:00
Jonathan G Rennison and GitHub
4d0682d034
Fix 1d04d402: Inverted visibility state in SettingsPage::UpdateFilterState ( #13543 )
2025-02-12 21:34:59 +00:00
Peter Nelson and GitHub
1d04d4027a
Codechange: Use EnumBitSet for SettingEntryFlags. ( #13534 )
2025-02-11 22:18:06 +00:00
Peter Nelson and GitHub
984da2455b
Codechange: Use EncodedString for Query window. ( #13528 )
...
This removes the need to separately capture and store global parameters.
2025-02-11 17:30:16 +00:00
Tyler Trahan and GitHub
b2f5a4901b
Add: Setting to allow placing houses manually in-game ( #13266 )
2025-02-09 18:34:31 +00:00
Peter Nelson and GitHub
d9bb002cac
Codechange: Use local parameters for formatting settings values. ( #13487 )
2025-02-07 20:18:03 +00:00
Peter Nelson and GitHub
99a32207b8
Codechange: Use preformatted strings for slider marks. ( #13484 )
2025-02-07 18:14:53 +00:00
Peter Nelson and GitHub
c3643e3ee0
Codechange: Pass raw string to editable query window. ( #13481 )
...
This avoids separating string id and parameters. EncodedString is not needed as it is the raw text that is editable.
2025-02-07 17:03:53 +00:00
Peter Nelson and Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +00:00
Peter Nelson and GitHub
c4c5028862
Codechange: Use EnumBitSet for SettingFlags. ( #13429 )
2025-02-01 15:46:51 +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
Peter Nelson and Peter Nelson
efb05396a7
Codechange: Use EnumBitSet for WindowFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson and GitHub
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Rubidium and rubidium42
45444f9666
Codechange: rename DECLARE_POSTFIX_INCREMENT to DECLARE_INCREMENT_DECREMENT_OPERATORS
2025-01-28 18:56:58 +01:00
Peter Nelson and GitHub
9b947a37b8
Codechange: Pass GRFConfig by reference where feasible. ( #13388 )
...
In places where a GRFConfig is passed by pointer and not checked for nullptr, use a reference instead.
2025-01-26 22:41:08 +00:00
Rubidium and rubidium42
4b2051a1c1
Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf
2025-01-19 23:01:35 +01:00