Peter Nelson
cccf4953f7
Fix: Incorrect padding on industry cargo window.
2023-05-09 17:39:12 +01:00
Peter Nelson
d2034d9c38
Codechange: Scrollbar methods now accept size_t.
...
This clears up a lot of casts from size_t to int.
2023-05-07 20:25:44 +01:00
PeterN
8bf62dac81
Codechange: Clean up build industry window. ( #10779 )
...
* Remove left-over code that treated an invalid list selection as 'fund
many', which is actually implemented as a separate button.
* Manual list management replaced with std::vector.
* Enabled state is only needed for the current selection.
* Selected index is not required only selected type.
2023-05-07 08:19:09 +01:00
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
2023-05-06 21:26:13 +02:00
Rubidium
4a5a9f57c4
Fix: conversion to smaller type warnings
2023-05-06 21:26:13 +02:00
Rubidium
c829930440
Codechange: replace strnatcmp with C++ string capable version
2023-04-29 12:07:45 +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
Peter Nelson
e5af5907ec
Change: Make all dropdown lists extend width if necessary.
...
This removes the auto_width parameter from ShowDropDown(At).
2023-04-13 20:57:47 +01:00
Tyler Trahan
6e52ceab96
Feature: Industry directory text filter ( #10518 )
2023-02-28 12:20:41 -05:00
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
2023-01-29 20:28:45 +01:00
Rubidium
8be908c919
Fix #10430 , Fix 6ba55e6: display chain window causing assert
2023-01-29 18:11:38 +01:00
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2023-01-29 07:21:34 +01:00
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2023-01-28 20:33:02 +01:00
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +01:00
PeterN
a7adadcf9b
Fix: Indent production in industry window and resolve button issues. ( #10184 )
...
Industry production used to be indented, although a different amount than
the industry accepts list. This is now added back, with the standard indent
width.
Additionally the cheat-mode production modifier buttons now support RTL and
the list height now takes account of the button height.
2022-11-19 21:18:53 +00:00
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2022-11-12 18:28:39 +00:00
Peter Nelson
b6ed595176
Codechange: Prefer suggested widget padding.
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
Peter Nelson
f5f035a22b
Codechange: Make use of Rect Width/Height helpers.
2022-11-12 18:28:39 +00: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
Peter Nelson
ccb62c3a55
Change: Simplify industry-cargoes widgets.
2022-10-11 08:36:59 +01:00
Jonathan G Rennison
67331fe946
Fix #9951 : Scenario editor random industries button and persistent storage ( #9952 )
...
BasePersistentStorageArray::SwitchMode was not called
2022-07-21 16:21:38 +01:00
Andrew Zhou
5ea55f3948
Fix: Prevents crash when no industries are present
2022-04-30 19:29:03 +02:00
Michael Lutz
8503854655
Codechange: Pass unpacked command arguments to command callbacks (except Script).
2021-12-16 22:28:32 +01:00
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map 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
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
Rubidium
ad89601c49
Codechange: do not use all upper case enumerators in a scoped enum
2021-12-05 21:41:43 +01:00
Tyler Trahan
4aa63ce8f3
Fix: Changing raw industry funding method redraws GUI ( #9572 )
2021-09-23 21:07:54 +02:00
SamuXarick
26f7f592cd
Fix #8316 : Make sort industries by production and transported with a cargo filter possible ( #8468 )
2021-08-11 19:25:59 +02: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
5844027eb8
Codechange: Remove FOR_ALL_SORTED_STANDARD_CARGOSPECS
2021-07-09 21:36:09 +02:00
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.
2021-06-17 23:34:59 +01:00
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
2021-05-27 18:30:56 +02:00
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