Commit Graph

337 Commits (c3d1264a4b917b6afc61c72bf0224cfa54d7abde)

Author SHA1 Message Date
Rubidium 74924c8186 Codechange: includes must be before 'safeguards.h' 1 year ago
Rubidium 2dd2b698d2 Codechange: convert C-style GetTownName API to std::string returning API 1 year ago
Patric Stout 772729cc7d
Fix: when syncing width of GUI items, take padding into account (#10915) 1 year ago
Peter Nelson 941dbadf9e Codechange: Add and use GetScrolledItemFromWidget to get a list item.
This function returns an iterator, either to the selected item or the
container's end.

This makes handling the result more robust as indices are not used.
1 year ago
Peter Nelson d2034d9c38 Codechange: Scrollbar methods now accept size_t.
This clears up a lot of casts from size_t to int.
1 year ago
Rubidium c829930440 Codechange: replace strnatcmp with C++ string capable version 1 year ago
Jonathan G Rennison 684c7bbc93 Fix: Violation of strict weak ordering in TownRatingSorter
If two unrated town names compare equal in TownNameSorter
1 year ago
Patric Stout 3ebc7ad16e Codechange: migrate all game-time-related timers to the new framework 1 year ago
Patric Stout 1ba4dcc924 Codechange: migrate all Window-related timers to the new framework
This means we also say goodbye to GUITimers.
1 year ago
glx22 3278f4c7bb Fix #10280, 59645c6: Ignore double-click for unavailable town actions 2 years ago
glx22 d6aa526b69 Fix #10461, 59645c6: Properly check for _local_company validity 2 years ago
Rubidium 3373128233 Codechange: pass the randomizer directly to the town name generation 2 years ago
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.
2 years ago
Didac Perez Parera 35d55bd534
Feature: Expand all towns in the scenario editor (#10215) 2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Joel-Milligan 59645c6733
Change: Remove scrollbar from town authority actions panel (#9928) 2 years ago
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.
2 years ago
Michael Lutz 2e39637db2 Codechange: Don't use a global for the 'not enough cash' message. 3 years ago
Michael Lutz 57b82e2e99 Codechange: Don't use globals for story/goal/sign/group command proc return values. 3 years ago
Michael Lutz 8503854655 Codechange: Pass unpacked command arguments to command callbacks (except Script). 3 years ago
Michael Lutz 1a42a8a5d5 Codechange: Un-bitstuff town-related commands. 3 years ago
Michael Lutz eab18f06a4 Codechange: Pass additional data as byte stream to command callbacks. 3 years ago
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.
3 years ago
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.
3 years ago
Michael Lutz 4fc055d6e9 Codechange: Align parameter order of command callbacks to command handlers. 3 years ago
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 3 years ago
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 3 years ago
Loïc Guilloux ddb6024bc6
Codechange: Don't explicitly unset _generating_world outside of genworld.cpp (#9418) 3 years ago
glx22 89ab8b79a5 Codechange: Remove FOR_EACH_SET_BIT 3 years ago
Loïc Guilloux 87eb0e4fce
Fix #9402, 2e136285: Crash when founding town using default name (#9403) 3 years ago
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 3 years ago
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.
3 years ago
rubidium42 6bca9e090d Codechange: add SetDParamStr that accepts std::string& 3 years ago
rubidium42 0345f99180 Feature: make the town directory horizontally resizable 3 years ago
Peter Nelson 4f93dd95e4 Cleanup: Tidy up resize, fill and minimal size on widgets in town list window. 3 years ago
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 4 years ago
frosch 5bfcd742b8 Change: Relocate rename and location buttons in all windows. 4 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
Jonathan G Rennison 87700bfe0e Codechange: Use cached town name for town list window filtering 5 years ago
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.
5 years ago
Jonathan G Rennison 22ba048c89 Change: Only resort town directory window on population change if necessary 5 years ago
glx 5c10c426fe Fix 196d5868: Always apply filter on town directory rebuild 5 years ago
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 5 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Charles Pigott fe9731d32c Fix: clang and MSVC warnings (glx) 5 years ago
glx22 b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 5 years ago