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
Peter Nelson
ccb62c3a55
Change: Simplify industry-cargoes widgets.
2 years ago
Jonathan G Rennison
67331fe946
Fix #9951 : Scenario editor random industries button and persistent storage ( #9952 )
...
BasePersistentStorageArray::SwitchMode was not called
2 years ago
Andrew Zhou
5ea55f3948
Fix: Prevents crash when no industries are present
2 years ago
Michael Lutz
8503854655
Codechange: Pass unpacked command arguments to command callbacks (except Script).
3 years ago
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map 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
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
Rubidium
ad89601c49
Codechange: do not use all upper case enumerators in a scoped enum
3 years ago
Tyler Trahan
4aa63ce8f3
Fix: Changing raw industry funding method redraws GUI ( #9572 )
3 years ago
SamuXarick
26f7f592cd
Fix #8316 : Make sort industries by production and transported with a cargo filter possible ( #8468 )
3 years ago
Loïc Guilloux
ddb6024bc6
Codechange: Don't explicitly unset _generating_world outside of genworld.cpp ( #9418 )
3 years ago
glx22
5844027eb8
Codechange: Remove FOR_ALL_SORTED_STANDARD_CARGOSPECS
3 years ago
PeterN
ce7ef4d824
Fix: Wrong cargo line position in IndustryCargo window. ( #9383 )
...
Resolved by changing calculation to determine the offset based on centring the cargo lines in the available space.
3 years ago
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
3 years ago
Rubidium
bb9121dbd4
Fix: comparison of narrow type to wide type in loop (potential for infinite loops)
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
cb89d22cf2
Codechange: add DrawString(Multiline) that accepts std::string&
3 years ago
rubidium42
6bca9e090d
Codechange: add SetDParamStr that accepts std::string&
3 years ago
Peter Nelson
055067c49c
Fix: Scale cargo lines in industry chain window.
...
Replaces constant pixel values with values scaled based on font size.
This allows the industry chain to maintain a consistent look across
different sizes. Previously all except cargo line height were fixed.
3 years ago
Peter Nelson
254ffe9dcc
Fix: Scale industry chain legend blob by font size.
3 years ago
Peter Nelson
617e85cc65
Fix: Scale legend blobs in Fund new industry window.
3 years ago
SamuXarick
7577dfa575
Codechange: Apply coding style
4 years ago
Kuhnovic
83ddb1501f
Feature: Remove all industries button in scenario editor ( #8550 )
4 years ago
dP
bab7de6cf2
Feature: Allow GameScripts to add additional text to Industry view window
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
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
4 years ago
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
4 years ago
Pavel Stupnikov
c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures ( #8282 )
4 years ago
stormcone
49b75d67bd
Fix 70f9c3c6: The *_filter_criteria variables contain an index, not a cargo. ( #8320 )
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
Yexo
1507902d00
Codechange: remove has_newindustries global
4 years ago
Yexo
ce618bf7e9
Codechange: replace custom timer and OnGameTick() with OnHundrethTick()
4 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
f1734e7815
Change: Only resort industry directory window on production change if necessary
5 years ago
Jonathan G Rennison
4cc1420beb
Fix: Non-deterministic name sorting in industry directory window
...
In the case where multiple industries have the same name, sorting
in the industry directory window is non-deterministic.
This results in the order changing on each re-sort, and is noticeable
when the industries have different production or transported values.
5 years ago
stormcone
596fb5d54a
Change: In the industry directory window an industry will be greyed out if it temporarily does not accept the cargo selected by the acceptance cargo filter.
5 years ago
stormcone
808253c29c
Change: Move the filtered cargo to the first place in the industry directory window's cargo lists
5 years ago
stormcone
70f9c3c655
Feature: Industry directory cargo filtering
5 years ago
glx
00c2a98cf3
Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops
5 years ago
glx
fa657c8360
Fix #7631 : 16 out cargo support for industry directory
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Niels Martin Hansen
53f8d0b815
Codechange: Use std::vector for industry tile layouts
5 years ago
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
5 years ago
Charles Pigott
5b34c8019f
Codechange: Remove Company/OwnerByte types
6 years ago
glx
48f99fd980
Codechange: use std::array for _sorted_industry_types
6 years ago