Commit Graph

331 Commits

Author SHA1 Message Date
Jonathan G Rennison 684c7bbc93 Fix: Violation of strict weak ordering in TownRatingSorter
If two unrated town names compare equal in TownNameSorter
2023-04-23 12:52:12 +01:00
Patric Stout 3ebc7ad16e Codechange: migrate all game-time-related timers to the new framework 2023-04-15 13:58:55 +02:00
Patric Stout 1ba4dcc924 Codechange: migrate all Window-related timers to the new framework
This means we also say goodbye to GUITimers.
2023-04-15 13:58:55 +02:00
glx22 3278f4c7bb Fix #10280, 59645c6: Ignore double-click for unavailable town actions 2023-02-10 19:39:21 +01:00
glx22 d6aa526b69 Fix #10461, 59645c6: Properly check for _local_company validity 2023-02-10 19:39:21 +01:00
Rubidium 3373128233 Codechange: pass the randomizer directly to the town name generation 2023-01-14 22:00:11 +01:00
PeterN 9e56e16147
Fix: Local authority window rating list height ignored icon sizes. (#10285)
Only font height was taken into account, so the list was broken if icon
sizes were taller than font height.
2022-12-26 18:26:01 +00:00
Didac Perez Parera 35d55bd534
Feature: Expand all towns in the scenario editor (#10215) 2022-12-25 19:42:50 +01:00
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2022-11-12 18:28:39 +00:00
Peter Nelson 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2022-11-12 18:28:39 +00:00
Joel-Milligan 59645c6733
Change: Remove scrollbar from town authority actions panel (#9928) 2022-11-11 23:52:38 +01:00
Bouke Haarsma 93d2d4590f Fix #9995: Adjust viewport zoom level for HiDPI displays
On HiDPI screens the zoom level is increased for detailed rendering. This causes hard-coded zoom levels to be off by this adjustment. To fix these default zoom levels, we scale the zoom level based on `_gui_zoom` to get the scaled zoom level.
2022-10-18 22:03:21 +02:00
Michael Lutz 2e39637db2 Codechange: Don't use a global for the 'not enough cash' message. 2021-12-16 22:28:32 +01:00
Michael Lutz 57b82e2e99 Codechange: Don't use globals for story/goal/sign/group command proc return values. 2021-12-16 22:28:32 +01:00
Michael Lutz 8503854655 Codechange: Pass unpacked command arguments to command callbacks (except Script). 2021-12-16 22:28:32 +01:00
Michael Lutz 1a42a8a5d5 Codechange: Un-bitstuff town-related commands. 2021-12-16 22:28:32 +01:00
Michael Lutz eab18f06a4 Codechange: Pass additional data as byte stream to command callbacks. 2021-12-16 22:28:32 +01:00
Michael Lutz 0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00
Michael Lutz b0990fcff7 Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
2021-12-16 22:28:32 +01:00
Michael Lutz 4fc055d6e9 Codechange: Align parameter order of command callbacks to command handlers. 2021-12-16 22:28:32 +01:00
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 2021-12-16 22:28:32 +01:00
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2021-12-16 22:28:32 +01:00
Loïc Guilloux ddb6024bc6
Codechange: Don't explicitly unset _generating_world outside of genworld.cpp (#9418) 2021-07-10 14:59:17 +02:00
glx22 89ab8b79a5 Codechange: Remove FOR_EACH_SET_BIT 2021-07-09 21:36:09 +02:00
Loïc Guilloux 87eb0e4fce
Fix #9402, 2e136285: Crash when founding town using default name (#9403) 2021-06-27 17:18:21 +02:00
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
PeterN 330a305c99
Fix: Apply unscaled padding to Viewport inside WWT_INSET. (#9219)
Since pixel dimensions in SetPadding() are scaled by GUI size, padding for inset viewports was excessive.

Instead, automatically apply padding for WWT_INSET at widget level. This applies to all widgets inside a WWT_INSET, which in all instances is a NWID_VIEWPORT.
2021-05-08 21:01:16 +01:00
rubidium42 6bca9e090d Codechange: add SetDParamStr that accepts std::string& 2021-05-06 21:45:36 +02:00
rubidium42 0345f99180 Feature: make the town directory horizontally resizable 2021-05-01 13:30:27 +02:00
Peter Nelson 4f93dd95e4 Cleanup: Tidy up resize, fill and minimal size on widgets in town list window. 2021-04-30 17:08:15 +01:00
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 2021-02-20 19:01:04 +01:00
frosch 5bfcd742b8 Change: Relocate rename and location buttons in all windows. 2021-01-11 22:15:58 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
Jonathan G Rennison 87700bfe0e Codechange: Use cached town name for town list window filtering 2020-01-12 19:37:43 +00:00
Jonathan G Rennison d35f35a968 Codechange: Use cached town, station, industry names for list window sorting
This is to avoid needing to expensively regenerate name strings on
every comparison when sorting by name in the town/station/industry
list windows.
2020-01-12 19:37:43 +00:00
Jonathan G Rennison 22ba048c89 Change: Only resort town directory window on population change if necessary 2020-01-12 19:37:43 +00:00
glx 5c10c426fe Fix 196d5868: Always apply filter on town directory rebuild 2020-01-07 14:21:35 +00:00
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 2019-12-21 20:13:03 +01:00
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Charles Pigott fe9731d32c Fix: clang and MSVC warnings (glx) 2019-09-30 14:00:06 +01:00
glx22 b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 2019-09-07 17:37:01 +01:00
Gabda b870596f15 Add #6887: Option to show zone inside local authority boundary of towns
Can be found at town information > local authority window
Layout for button is same as Graph Keys
Turn on/off for every town individually
2019-08-17 21:45:20 +01:00
TELK 196d586849 Feature: Town name filtering (#7621) 2019-07-22 20:27:39 +01:00
peter1138 b454ca7110 Fix 81d335b: Coverage button missing from town window in scenario editor. 2019-04-27 14:41:58 +01:00
peter1138 81d335b081 Feature: Add station coverage area display for towns. 2019-04-25 09:14:01 +02:00
glx 2db88953e7 Codechange: use std::sort() in GUIList 2019-04-13 12:49:18 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00