Commit Graph

286 Commits

Author SHA1 Message Date
Michael Lutz 6fe445e6c0 Codechange: Un-bitstuff station/depot/waypoint 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 4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 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
Peter Nelson 7385e780ac Cleanup: nested_array should not be accessed directly.
Replace accesses with GetWidget() as documented.
2021-06-14 17:49:01 +01:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +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
Charles Pigott 6af49b7885 Fix #8724: Got wrong DepotID/StationID for airports, causing crash 2021-02-22 14:20:21 +00:00
Charles Pigott 3af407340e Fix #8349: Close depot vehicle list windows when closing the depot window 2021-02-21 17:58:19 +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
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
glx 1f6b3a37f9 Codechange: Replace FOR_ALL_ENGINES with range-based for loops 2019-12-21 20:13: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
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 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
Alexander Weiss b3dc90af58 Change: Clone tool in depot window now behaves like clone button in vehicle window. Keep the tool active when share-cloning. Open the vehicle GUI when copy-cloning. (#6754) 2018-10-31 12:51:10 +01:00
frosch 42392fd7b5 (svn r27938) -Fix (r27899): When scrolling in the train depot, also scroll the tile separators. 2017-12-10 13:48:49 +00:00
frosch c14f23a03d (svn r27937) -Change: When train depots have a horizontal scrollbar, allow scrolling 1 tile beyond the longest train, so you can actually attach a wagon at the end. 2017-12-10 13:48:06 +00:00
frosch 61c68f906d (svn r27899) -Feature: Draw vertical separators at tile distance in the train depot GUI. This only applies if all vehicles use consistent lengths, i.e. either if only using default vehicles, or if only using NewGRF vehicles with 32px reference width. (based on patch by Wolf01) 2017-08-26 12:12:59 +00:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
frosch ddc9205212 (svn r27630) -Codechange: Deduplicate code to attach vehicle to cursor. 2016-08-15 18:33:52 +00:00
frosch 3cb7d9703b (svn r27628) -Codechange: Prepare for drawing cursors consisting of multiple sprites. 2016-08-15 18:33:08 +00:00
frosch 7d4754a4f8 (svn r27583) -Fix [FS#6415]: Do not decrease the column width of depot windows when vehicles with high unitnumbers leave. (Airbus) 2016-05-29 12:21:40 +00:00
alberth 3ccfc954f3 (svn r27450) -Feature[FS#6391](r27446): Lower the sell-chain button in the train depot GUI while dragging a vehicle over it. (Eearslya) 2015-11-20 09:25:27 +00:00
frosch f6891ac30e (svn r27446) -Feature: Lower the sell-vehicle button in the depot GUI while dragging a vehicle over it. (Eearslya) 2015-11-14 22:54:52 +00:00
frosch a8080b6256 (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). 2015-02-01 20:54:24 +00:00
frosch 3bc7ee3ab7 (svn r27133) -Fix: Dragging of free wagons in depot failed with GUI zoom. 2015-02-01 19:40:04 +00:00
rubidium deca49f4c6 (svn r27014) -Fix [FS#6102]: unit number was not always fully shown in depots 2014-10-14 11:40:38 +00:00
peter1138 ce9fab58bc (svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists. 2014-10-04 16:40:23 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium a399fc667c (svn r26106) -Codechange: document fall through explicitly 2013-11-25 13:28:08 +00:00
frosch 3a81868518 (svn r25548) -Fix [FS#5629] (r25537): Removed too much code and forgot some other places. 2013-07-01 17:15:30 +00:00
frosch 43ec0bf0c1 (svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size. 2013-06-30 14:36:31 +00:00
frosch 98fdd20f84 (svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX widgets. 2013-06-30 14:32:31 +00:00
frosch ce110eed32 (svn r25313) -Fix: Do not assume '8' to be the broadest digit, but test all of them. 2013-06-01 14:33:48 +00:00
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 2013-05-26 19:30:07 +00:00
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 2013-05-26 19:25:01 +00:00
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 2013-05-26 19:23:42 +00:00
frosch 5eddbb338b (svn r25185) -Fix [FS#5508]: Remove ambivalent functions CargoList::Empty() and Count(), and replace them with VehicleCargoList::StoredCount(), TotalCount(), StationCargoList::AvailableCount() and TotalCount(). (fonsinchen) 2013-04-13 13:42:08 +00:00
frosch c3832ffb7f (svn r24955) -Change (r24808) [FS#4458]: Revert to opening the vehicle GUI again when cloning vehicles using the clone-button from the depot GUI. This button cannot be used for sequential cloning, so the argument about opening many windows does not hold as it does for the clone button from the vehicle GUI. 2013-02-02 12:54:29 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00