1
0
Fork 0
Commit Graph

607 Commits (d00196cd65742f5468bf49f95984b9e0d85f52dd)

Author SHA1 Message Date
frosch d00196cd65 Change: Rearrange buttons in the intro screen, remove unnecessary ones. 2025-05-07 18:41:48 +02:00
frosch 0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
Peter Nelson ac76212b80 Fix: Closing the Game Options window closes all textfile windows.
Record the parent window that opens a textfile window so only child windows are closed instead of all.
2025-05-04 19:36:46 +01:00
Rubidium 7805c1c189 Codechange: use std::string_view for ini_key 2025-05-01 23:24:43 +02:00
Rubidium ef71ce0a9d Codechange: return std::string_view for Textbuf::GetText() 2025-04-29 22:15:49 +02:00
frosch cdafc50c94 Codechange: Replace atoi and atoll with ParseInteger. 2025-04-29 20:14:56 +02:00
Peter Nelson b87ce9c845
Change: Draw info headers as shade of window colour instead of pixel colour. (#14123)
Use the normal or lightest colour gradient to pick a suitable colour, instead of an arbitrary pixel colour.

(Except for the NewGRF window's info panel, this happens to be the same colour.)
2025-04-26 22:38:24 +01:00
Peter Nelson 87b5b0ffa3
Fix 2b80812922: Map size column in server list may be too wide. (#14094)
Incorrect change from SetDParamMaxValue to GetParamMaxValue.
2025-04-24 21:05:31 +01:00
Peter Nelson 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
Rubidium 4e14f0ac3f Codechange: pass network tokens as std::string_view or with move semantics where appropriate 2025-04-20 22:43:24 +02:00
Peter Nelson 5008568dfc
Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
Peter Nelson 9feaa6b7bc
Codechange: Use vector/unique_ptr to manage network game information. (#13902)
Replaces linked list with manual memory management.
2025-03-27 18:48:41 +00: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
Rubidium ec647975ad Cleanup: remove ancient FIXME comments 2025-03-16 05:42:29 +01:00
Rubidium 754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Peter Nelson 3eb89f04b5
Codechange: Use EnumBitSet for QueryStringFlags. (#13792) 2025-03-10 18:59:35 +00:00
Peter Nelson ab0d6e8b95 Codechange: Drop default widget strings for network windows. 2025-03-04 08:23:28 +00:00
Peter Nelson 4e485cd083
Fix: Network relay question used string parameters unconventionally. (#13734) 2025-03-04 00:25:15 +00:00
Peter Nelson e9609e4558
Codechange: Use GetWidgetString for network windows. (#13699) 2025-03-02 18:51:54 +00:00
Rubidium c540c2bcf7 Codechange: explicitly initialise member variables of Windows 2025-02-27 19:58:31 +01:00
Peter Nelson 2b80812922
Codechange: Use parameterised GetString() in network-related windows. (#13635) 2025-02-22 13:16:47 +00:00
Rubidium fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Peter Nelson 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
Peter Nelson 2cb9f55183 Codechange: Store EncodedString for tooltip text.
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Peter Nelson 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 28eb5e05c8 Codechange: Use EnumBitSet for NWidContainerFlags. 2025-02-06 19:43:35 +00:00
Peter Nelson 59354576d4
Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436) 2025-02-01 23:09:18 +00:00
Peter Nelson 5664b1e2f6
Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
2025-01-31 17:09:09 +00:00
Peter Nelson 56b1e9df1f Codechange: Use EnumBitSet for FrameFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson d30e8dd1c1 Codechange: Use EnumBitSet for WindowDefaultFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson efb05396a7 Codechange: Use EnumBitSet for WindowFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Peter Nelson f6ab2b69c6
Codechange: Define GRFConfigList alias and pass by reference. (#13358)
This adds the distinction between a single GRFConfig and a GRFConfig list, and simplifies how GRFConfig lists are passed to various functions.
2025-01-22 22:30:32 +00:00
Rubidium 4b2051a1c1 Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf 2025-01-19 23:01:35 +01:00
Peter Nelson 84e049e23c
Codechange: Use ranges to get select server list position. (#13316)
Replaces a raw loop that uses array indexes.
2025-01-14 19:16:46 +00: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 99d790c4bb Codechange: split widget_data into its actual components 2025-01-04 11:33:24 +01:00
Rubidium ef87acc1ff Codechange: make STR_NULL the default for all widget construction functions 2025-01-03 23:25:27 +01:00
Rubidium 7c2668d10f Codechange: replace SetDataTip(0x0, with SetTooltip( 2025-01-02 23:28:43 +01:00
Rubidium ee3ea57a85 Codechange: replace SetDataTip(RWV_ with SetResizeWidgetTypeTip(RWV_ 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 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
Peter Nelson b1cac3c1a9
Codechange: Use _TOOLTIP suffix for another tooltip StringID. (#13219) 2025-01-01 15:38:02 +00:00
Peter Nelson ba2b14b075 Change: [UI] Use proper matrix padding for server list test.
Text was only positioned correctly at 1x scale due to old pixel-based positioning method.
2024-07-21 10:07:50 +01:00
Peter Nelson d85f4b3ebf Change: [UI] Use interface scaled sizes for server list.
Avoid hardcoded values and use WidgetDimensions to set icon positions.

This fits better with non-power-of-2 interface scale.
2024-07-21 10:07:50 +01:00
Peter Nelson 4b6e3f86c2
Cleanup: Remove write-only flag_offset member from server list. (#12872)
A remnant of language flags, removed from the server list long ago.
2024-07-21 08:18:09 +01:00
Rubidium 14200212b7 Codechange: use std::optional<std::string> over char * for text query results 2024-06-29 16:33:16 +02:00
Peter Nelson 55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. (#12779) 2024-06-12 23:08:35 +01:00