Peter Nelson and Peter Nelson
d02d57b348
Change: Make dropdown text filter persistent in some cases.
2026-03-08 19:25:28 +00:00
Peter Nelson and Peter Nelson
d685fc97f1
Change: Enable dropdown text filter for various dropdown lists.
2026-03-08 19:25:28 +00:00
Cyprian Klimaszewski and rubidium42
48703f0a75
Codechange: Make MainToolbarEditorHotkeys enum an enum class.
2026-03-04 19:59:25 +01:00
Cyprian Klimaszewski and rubidium42
85a6c4b65d
Codechange: Make TownMenuEntries enum an enum class.
2026-03-04 19:59:25 +01:00
Cyprian Klimaszewski and rubidium42
c868a25245
Codechange: Make MapMenuEntries enum an enum class.
2026-03-04 19:59:25 +01:00
Cyprian Klimaszewski and rubidium42
e30113c01c
Codechange: Make SaveLoadEditorMenuEntries and SaveLoadNormalMenuEntries enums enum classes.
2026-03-04 19:59:25 +01:00
Cyprian Klimaszewski and rubidium42
9eaab1cfb9
Codechange: Make OptionMenuEntries enum an enum class.
2026-03-04 19:59:25 +01:00
Cyprian Klimaszewski and rubidium42
6b336c206c
Codechange: Make CallBackFunction enum an enum class.
2026-03-04 19:59:25 +01:00
Cyprian Klimaszewski and rubidium42
d13887bca4
Codechange: Make ToolbarMode enum an enum class.
...
Also makes that _toolbar_mode is properly reseted to
ToolbarMode::Normal.
2026-03-04 19:59:25 +01:00
Rubidium and rubidium42
9a5187bac8
Codechange: document return types and parameters
2026-02-21 06:13:15 +01:00
Rubidium and rubidium42
4adf494ebc
Codechange: enum-class-ify Commands
2026-01-28 23:32:51 +01:00
Tyler Trahan and GitHub
18f2f7eb2d
Codechange: Use enum class for setting values ( #15074 )
2026-01-10 22:40:48 +00:00
Cyprian Klimaszewski and GitHub
52d6a579e5
Codefix: Use special values of CompanyID instead of CTMN "enum" ( #14886 )
2026-01-08 22:26:24 +00:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson and GitHub
069833963c
Codechange: Replace drop down list's default bools with DropDownOptions. ( #14837 )
...
Improves maintainability and avoids positional ambiguity.
2025-11-29 16:17:44 +00:00
Peter Nelson and GitHub
66b6d71e32
Codechange: Use std::initializer_list for NWidgetPart data. ( #14749 )
...
Avoids using C/C++ arrays.
2025-11-01 22:33:00 +00:00
Peter Nelson and Peter Nelson
69697a62d3
Fix 8c58fb1efd: Doubled beep sounds when clicking toolbar buttons.
...
* ShowDropDownList() now issues a beep, so individual toolbar buttons no longer need to do it.
* HandleButtonClick() may be called twice for some buttons, as it is called by automatically for PUSH buttons.
This caused some beeps to sound louder than others.
2025-09-21 10:12:22 +01:00
Peter Nelson and Peter Nelson
ce166bbbc3
Codechange: Demagicify main toolbar button type.
...
Use WWT_PUSHIMGBTN for non-menu buttons so they automatically raise, replacing the custom OnTimeout function.
2025-09-21 10:12:22 +01:00
Peter Nelson and GitHub
d07ff71c67
Fix ed67aedabf: Wrong button type for town menu in scenario editor toolbar. ( #14641 )
...
The button was changed from an action to a menu, which should be WWT_IMGBTN instead of WWT_PUSHIMGBTN.
2025-09-21 01:25:31 +00:00
Rubidium and rubidium42
7c0f69a8fe
Codefix: typos in comments and strings
2025-08-31 10:30:37 +02:00
Peter Nelson and Peter Nelson
3a5eaf367a
Feature: Option to disable activate-on-release behaviour of toolbar dropdown buttons.
2025-08-18 19:48:22 +01:00
Tyler Trahan and GitHub
8c58fb1efd
Fix: Missing button beeps ( #14470 )
2025-08-05 13:57:45 -04:00
Peter Nelson and GitHub
614a01907a
Codechange: Make functions for click and confirm beeps. ( #14484 )
...
Avoids repetition.
2025-07-27 21:54:32 +01:00
Peter Nelson and Peter Nelson
984d864c72
Codechange: Add OnClick handler for dropdown items.
...
This allows each dropdown item to indicate if something different should happen depending on where in the item was clicked.
2025-05-25 09:13:05 +01:00
frosch and frosch
2926179d02
Fix: Restore the behaviour when entering numbers in query windows: clamp integers out of range to the maximum valid value.
2025-05-20 12:57:30 +02:00
frosch and frosch
0d5b3ebd7f
Codechange: Declare all IntervalTimers const, which can be const.
2025-05-06 18:29:41 +02: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
Peter Nelson and GitHub
7846f0f4ee
Fix a4dc7249ee: Changing language or interface scale could hang. ( #14087 )
...
A bit of hysteresis caused by OnResize calling ReInit calling OnResize calling ReInit calling OnResize calling ReInit ...
2025-04-24 00:29:54 +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
frosch and GitHub
2a62eea005
Codefix: Comment style. ( #14064 )
2025-04-21 17:25:09 +02:00
frosch and frosch
cde350dc01
Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette.
2025-04-18 23:41:37 +02:00
Peter Nelson and Peter Nelson
8275bbfb87
Codechange: Pass Viewport by reference.
...
This means we do not have to care what type of pointer is used.
2025-04-09 22:03:23 +01:00
Peter Nelson and Peter Nelson
732109e444
Codechange: Use EnumBitSet for RoadTypes.
2025-03-25 20:15:48 +00:00
Peter Nelson and Peter Nelson
819e097d6e
Codechange: Use separate RoadTypes mask to list road or tram roadtypes.
...
This simplifies logic reduces ambiguity.
2025-03-25 20:15:48 +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 GitHub
3eb89f04b5
Codechange: Use EnumBitSet for QueryStringFlags. ( #13792 )
2025-03-10 18:59:35 +00:00
Rubidium and rubidium42
0de7fd3c24
Codefix: check the result of dynamic_cast for nullptr
2025-03-09 19:35:14 +01:00
Peter Nelson and Peter Nelson
b55af05626
Codechange: Pass encoded script strings as EncodedString.
...
This removes the ambiguity of having std::strings that may or may not be encoded.
2025-03-04 21:40:39 +00:00
Peter Nelson and Peter Nelson
92e4ef7e77
Codechange: Move to GetWidgetString for toolbar windows.
2025-03-03 22:34:22 +00:00
Peter Nelson and Peter Nelson
edf9f597ec
Codechange: Use parameterised GetString() for remaining windows.
2025-03-02 07:29:25 +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
5cee804f98
Codechange: remove ZeroedMemoryAllocator from NWidgetBase
2025-02-22 14:38:33 +01:00
Rubidium and rubidium42
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Peter Nelson and GitHub
3ade64954c
Change: Restore wider spacers in main toolbars. ( #12039 )
...
Width for all spacers was included only due to an off-by-one from counting buttons and not excluding the normally hidden switcher button.
Spacer width of quarter the button width is now included explicitly,
2025-02-16 14:51:07 +00:00
Rubidium and rubidium42
ab8177ea77
Codechange: strongly type CompanyID
2025-02-16 14:02:18 +01:00
Rubidium and rubidium42
1ffc950e22
Codechange: use prefix operator++ for CompanyID iterations
2025-02-16 14:02:18 +01:00
Peter Nelson and GitHub
6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. ( #13553 )
2025-02-14 08:30:04 +00:00
Peter Nelson and GitHub
20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. ( #13551 )
...
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00