Rubidium
bb9121dbd4
Fix: comparison of narrow type to wide type in loop (potential for infinite loops)
2021-05-15 10:16:10 +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
cb89d22cf2
Codechange: add DrawString(Multiline) that accepts std::string&
2021-05-06 21:45:36 +02:00
rubidium42
6bca9e090d
Codechange: add SetDParamStr that accepts std::string&
2021-05-06 21:45:36 +02:00
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.
2021-04-30 17:08:15 +01:00
Peter Nelson
254ffe9dcc
Fix: Scale industry chain legend blob by font size.
2021-04-30 17:08:15 +01:00
Peter Nelson
617e85cc65
Fix: Scale legend blobs in Fund new industry window.
2021-04-30 17:08:15 +01:00
SamuXarick
7577dfa575
Codechange: Apply coding style
2021-02-19 00:14:30 +00:00
Kuhnovic
83ddb1501f
Feature: Remove all industries button in scenario editor ( #8550 )
2021-02-10 16:35:50 +01:00
dP
bab7de6cf2
Feature: Allow GameScripts to add additional text to Industry view window
2021-01-22 09:50:53 +00: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
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
2020-12-27 10:55:42 +00:00
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
2020-12-15 00:29:30 +01:00
Pavel Stupnikov
c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures ( #8282 )
2020-12-14 23:35:07 +01:00
stormcone
49b75d67bd
Fix 70f9c3c6: The *_filter_criteria variables contain an index, not a cargo. ( #8320 )
2020-09-25 15:35:48 +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
Yexo
1507902d00
Codechange: remove has_newindustries global
2020-06-01 22:46:06 +02:00
Yexo
ce618bf7e9
Codechange: replace custom timer and OnGameTick() with OnHundrethTick()
2020-06-01 22:46:06 +02: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
f1734e7815
Change: Only resort industry directory window on production change if necessary
2020-01-12 19:37:43 +00:00
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.
2020-01-07 09:03:36 +01:00
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.
2020-01-05 20:52:17 +00:00
stormcone
808253c29c
Change: Move the filtered cargo to the first place in the industry directory window's cargo lists
2020-01-05 20:52:17 +00:00
stormcone
70f9c3c655
Feature: Industry directory cargo filtering
2020-01-05 20:52:17 +00:00
glx
00c2a98cf3
Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops
2019-12-21 20:13:03 +01:00
glx
fa657c8360
Fix #7631 : 16 out cargo support for industry directory
2019-11-13 08:11:37 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Niels Martin Hansen
53f8d0b815
Codechange: Use std::vector for industry tile layouts
2019-10-19 17:16:25 +01:00
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
2019-09-07 17:37:01 +01:00
Charles Pigott
5b34c8019f
Codechange: Remove Company/OwnerByte types
2019-04-29 17:40:22 +01:00
glx
48f99fd980
Codechange: use std::array for _sorted_industry_types
2019-04-18 21:49:34 +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
Michael Lutz
c7b9987d08
Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
...
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
2019-04-09 22:45:15 +02:00
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
2019-03-28 00:09:33 +01:00
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
2019-03-26 20:15:57 +00:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
2019-03-26 20:15:57 +00:00
Henry Wilson
9cba6f7193
Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()
2019-03-26 20:15:57 +00:00
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
2019-03-26 20:15:57 +00:00
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
2019-03-24 16:10:04 +01:00
peter1138
b3ef06fdf3
Fix #7384 : Industry Chain tooltips did not display on right-click.
...
This is fixed by handling the new Window::OnTooltip() event instead of OnHover()
2019-03-20 23:00:32 +00:00
Niels Martin Hansen
08ffa16d51
Fix 8859381: Display of requires/produces in Build Industry window
...
Change the window to use a dynamically generated string of cargoes,
instead of one of a few fixed-length lists. With up to 16 cargoes
on each list, having 16 with the only difference how many are listed
seems like a bad maintenance idea.
2019-01-19 13:33:17 +01:00
Peter Nelson
15320a37b9
Change: OnGameTick() is only called when not paused.
2019-01-11 11:56:21 +00:00
Peter Nelson
2a8fa5fef9
Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks.
2019-01-11 11:56:21 +00:00
Niels Martin Hansen
9b560eaa51
Fix: Industry chain window layout no more unnecessarily large when the number of cargoes in/out isn't large either
2018-11-03 21:43:54 +01:00
Niels Martin Hansen
e66cec8f86
Add: NewGRF support for 16-in-16-out industries
2018-11-03 21:43:54 +01:00
Niels Martin Hansen
8859381d30
Add: Industries can produce and accept up to 16 different cargoes
2018-11-03 21:43:54 +01:00
Charles Pigott
e0c0394e37
Fix: Remove various dead or unnecessary assignments
2018-10-31 12:41:49 +01:00