dP
c73b88ddca
Fix: Don't send unused tile field over the network ( #10507 )
2023-02-24 22:50:11 +01:00
SamuXarick
b2a5ebcfc4
Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI ( #10227 )
...
* Change: Store "all time" and "since minimum age" last year profits on groups
* Fix: Update last year profit for groups when copying vehicle statistics on autoreplace
* Codechange: Refactor profit last year
* Change: Rename some group related items for clarity
* Change: Reorder the fields in GroupStatistics
That way less memory gets wasted.
2023-01-22 08:14:02 -05:00
PeterN
f7e2b6ef12
Change: Make vehicle list dropdown buttons resize to fit strings. ( #10286 )
2022-12-27 18:39:37 +00:00
Bernard Teo
8a78fa7121
Feature: Contextual actions for vehicles grouped by shared orders ( #8425 )
2022-11-26 18:03:21 +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
stormcone
0d303d6c3f
Feature: Add cargo filter support to vehicle list. ( #8308 )
2022-11-08 21:11:16 +01:00
Peter Nelson
5cc1a48db7
Change: Use NC_BIGFIRST in group window.
...
This means we no longer need to manually calculate the size of other
widgets in the window to determine how much space we need, as the widget
system will automatically fill as much as possible.
2022-10-16 14:56:34 +02: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
e08b3abe7f
Codechange: Un-bitstuff group and autoreplace commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
21675ec7e2
Codechange: Un-bitstuff vehicle/engine 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
123c7f99c3
Codechange: Move command callback declarations to the cmd header files.
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
Bernard Teo
0533b666b7
Fix #9702 : Display order window for vehicle group on ctrl-click only when using shared orders ( #9704 )
2021-11-19 00:03:52 +00:00
Bernard Teo
6a6dbbaad2
Feature: Ctrl-Clicking GB_SHARED_ORDERS vehicle list opens order window
2021-09-18 11:17:49 +02:00
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
2021-05-29 21:08:25 +02:00
peter1138
c56fce70b4
Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG.
2021-04-22 22:57:00 +02:00
peter1138
27a956ba62
Codechange: Replace Group::replace_protection with Group::flags
2021-04-22 22:57:00 +02:00
Peter Nelson
2a0365b3d9
Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()
...
Line height defaults to the resize height of the relevant widget, which is
set in all cases. Therefore it is not necessary to specify this value every time.
Additionally fixes scrolled padding for the framerate window.
2021-04-21 23:12:10 +02:00
PeterN
8e539ce293
Change: Improve layout and spacing of vehicle group widgets. ( #9041 )
...
Existing layout included a blank widget above the group list to align with the vehicle list, however since then an additional sort-by row was added.
Group list size tweaks to match normal row size (at least with normal gui and text size.)
Removed reduction of 2 rows in the group list <- main culprit of odd sizing.
Removed fill attribute on buttons which gave strange sizes, and put it on the group info widget instead.
Tweaked various soft-padding values to line up (centreing text with a 1px offset does not make centred text.)
2021-04-17 19:19:06 +01:00
Bernard Teo
f0a24e98f5
Fix #8922 : Show vehicle window for single vehicle in shared order grouping ( #8926 )
2021-04-06 19:30:35 +01:00
SamuXarick
a4035af337
Codechange: Apply coding style ( #8640 )
...
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
2021-02-05 11:00:36 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Patric Stout
c988b4d62b
Fix #8332 : aborting group drag&drop could cause crashes with vehicle drag&drop ( #8511 )
...
The selected group was not reset when drag&drop was aborted. When
after that vehicle drag&drop was successful, group drag&drop code
was still executed, causing weird behaviour or even crashes.
2021-01-07 10:32:24 +01:00
Bernard Teo
4af1acfe92
Feature: Drag-and-drop vehicles in group GUI for shared order groups
2020-12-21 23:15:53 +01:00
Bernard Teo
a5047b7566
Cleanup: Use range-based for-loop in group_gui.cpp
2020-12-21 23:15:53 +01:00
Bernard Teo
e59c400ca6
Feature: Option to group vehicle lists by shared orders
...
This applies to all kinds of vehicle lists, as well as the "vehicle groups" window.
2020-12-21 23:15:53 +01:00
Bernard Teo
584df548f1
Codechange: Make vehicle lists internally support grouping of vehicles
...
This is in preparation for the new UI feature that allows grouping by shared orders.
2020-12-21 23:15:53 +01:00
Jonathan G Rennison
c167648d75
Fix: Violation of strict weak ordering in group name sorters
...
This could be caused by a group being renamed, and the old
name being cached from a previous sort.
See: #7838
2020-06-18 12:38:43 +02:00
stormcone
492d2704f1
Fix #7974 : Crash when CTRL+click to show a vehicle group that is collapsed
2020-02-06 16:10:46 +00:00
Samu
8b0e4bb101
Codechange: Use const instead of magic number for vehicle profit threshold
2020-01-09 13:51:58 +00:00
stormcone
cc1d72c3a3
Feature: Control + click on the vehicle details button in the vehicle view window opens the vehicle group window, then selects and scrolls to the vehicle's group.
2019-12-23 18:04:10 +00:00
stormcone
a363933d08
Feature: Control + click on a vehicle in the vehicle group window selects and scrolls to the vehicle's group.
2019-12-23 18:04:10 +00:00
stormcone
551bde77a4
Add: A function which selects and scrolls to a particular group in the vehicle group window.
2019-12-23 18:04:10 +00:00
glx
4ae829cb27
Codechange: Replace FOR_ALL_GROUPS with range-based for loops
2019-12-21 20:13:03 +01:00
stormcone
40ebf3c765
Fix: Do not refer to a function in the documentation that was removed years ago ( #7844 )
...
The 'DoDrawString' was removed with this commit: f11300d
2019-11-25 22:59:03 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
2019-09-07 17:37:01 +01: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
Charles Pigott
49f7332b75
Feature #6053 : Collapsible vehicle groups (3298)
2019-03-27 06:58:48 +00:00
Charles Pigott
8890436af1
Add #6189 : Groups now count the total number of vehicles in subgroups (3298)
2019-03-27 06:58:48 +00:00