Commit Graph

319 Commits

Author SHA1 Message Date
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
frosch 1e30884201 (svn r24854) -Fix (r24839): Only consider vehicles available in the climate for purchase/depot cell size. 2012-12-26 12:24:03 +00:00
michi_cc 245e32a10e (svn r24839) -Feature [FS#5271]: [NewGRF] Support oversized purchase list sprites. (Based on patch by Eddi) 2012-12-23 01:00:25 +00:00
frosch 8872ed12ff (svn r24808) -Feature(ette) [FS#4458]: When share-cloning vehicles don't open the vehicle window of the new vehicle. The only reasonable thing to do with the new vehicle is to start it, which can also be done via the depot GUI. 2012-12-09 16:54:02 +00:00
frosch b533523258 (svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations. 2012-12-08 17:18:51 +00:00
frosch 03736af2ae (svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default. 2012-11-11 16:10:43 +00:00
frosch 90b539818f (svn r24351) -Fix: Short vehicles were not properly positioned at the cursor when dragging for RTL languages. 2012-06-23 14:31:58 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
rubidium b8640b986f (svn r23539) -Codechange: prevent conflict between widget naming of (vehicle) depots and vehicle details 2011-12-16 16:57:56 +00:00
truebrain e9f584ac21 (svn r23531) -Codechange: document and rename widgets to be consistent and understandable 2011-12-16 16:27:45 +00:00
truebrain 2aa774e831 (svn r23528) -Codechange: move widget enums to widgets/NNN_type.h 2011-12-15 22:22:55 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
rubidium b5a2183214 (svn r23484) -Fix [FS#4770]: in case you already have orders, ignore the vehicles when adding an extra order 2011-12-10 19:20:30 +00:00
peter1138 81598273e9 (svn r23316) -Feature: Add ability to zoom in to 2x and 4x level. 2011-11-24 12:38:48 +00:00
frosch bbc3409942 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs. 2011-11-01 16:51:47 +00:00
terkhen 10caf391a1 (svn r22343) -Change: Remove pixel limiter for query strings. 2011-04-17 18:42:17 +00:00
frosch ce993e7cd4 (svn r22305) -Add: One digit for the fractional part of train lengths in the depot view. 2011-04-09 20:27:34 +00:00
frosch 652c9cb663 (svn r22247) -Codechange: Update comments wrt. ForceRebuild() in command-scope. 2011-03-13 21:34:21 +00:00
frosch ec9540a12a (svn r22241) -Codechange: Add additional to-be-used parameter to OnInvalidateData(). 2011-03-13 21:31:29 +00:00
rubidium c85d350310 (svn r21960) -Change: show the length of vehicles in tiles, instead of half tiles in the depot
-Fix [FS#4461]: don't count the number of vehicles but the length of vehicles to (configurably) limit train length
2011-02-04 15:40:35 +00:00
terkhen 734994c9ba (svn r21924) -Codechange: Unify some parts of the articulated vehicle code.
-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
2011-01-29 17:30:25 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
terkhen 679cd3c21b (svn r21803) -Cleanup: Remove unnecessary semicolons. 2011-01-15 15:36:58 +00:00
terkhen 48b7916458 (svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains. 2010-12-14 21:33:53 +00:00
terkhen 79e2b3153d (svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class. 2010-12-14 21:26:03 +00:00
rubidium a029b2b83a (svn r21477) -Fix [FS#4300]: tooltips were removed when their related window got closed 2010-12-12 14:14:26 +00:00
rubidium 091263317e (svn r21409) -Codechange: limit depot name by amount of characters, not bytes 2010-12-05 22:24:04 +00:00
terkhen f31485a2f9 (svn r21241) -Fix: Display dragged vehicles in the correct orientation while using RTL languages. 2010-11-18 17:49:42 +00:00
rubidium 30637a8340 (svn r21157) -Codechange: remove information about the text direction out of the language "list" 2010-11-13 09:56:25 +00:00
alberth 7e48d85104 (svn r21060) -Doc: Improved wording of comments (mostly by __ln__) 2010-10-30 17:51:07 +00:00
yexo c3d4763a00 (svn r20788) -Fix (r20733)[FS#4119]: start/stop all vehicles from non-train depots was broken 2010-09-12 16:54:39 +00:00
rubidium 0e840f7360 (svn r20770) -Codechange: move some bits around in CmdMassStartStop's parameters 2010-09-08 21:14:41 +00:00
smatz fd54943c7a (svn r20753) -Feature [FS#3999]: make it possible to select vehicle to clone and vehicle to clone orders from directly from vehicle lists and depot window 2010-09-06 14:14:09 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
rubidium cc658392eb (svn r20573) -Codechange: free/reserve some bits in the sell vehicle command to increase the vehicle pool limit 2010-08-19 20:45:29 +00:00
rubidium 646fbb628a (svn r20572) -Codechange: free/reserve some bits in the wagon move command to increase the vehicle pool limit 2010-08-19 20:42:00 +00:00
rubidium 926594b599 (svn r20547) -Change: the way order backups are performed. Now restoring an order doesn't require up to 765 commands. 2010-08-18 20:48:38 +00:00
rubidium 019878118d (svn r20545) -Codechange: make sure an OrderBackup gets cleared when the depot it belongs to gets removed, the depot window gets closed or when another vehicle gets sold in a depot 2010-08-18 18:52:16 +00:00
rubidium 38ca44594f (svn r20539) -Codechange: make order backups more self-contained. 2010-08-18 15:15:59 +00:00
rubidium 9b8d7048da (svn r20533) -Codechange: shuffle a bit with the bits in the sell command 2010-08-18 00:03:08 +00:00
frosch 419c269e56 (svn r20465) -Codechange: Use NWID_SELECTION to hide horizontal scrollbar and 'sell chain' button for non-train depot windows. 2010-08-12 11:46:20 +00:00
frosch e5ff41ee53 (svn r20464) -Codechange/Fix: Do not use a scrollbar to store the number of columns for non-train depot windows. 2010-08-12 11:21:30 +00:00
frosch 9e538acc03 (svn r20461) -Codechange: Replace WWT_HSCROLLBAR, WWT_SCROLLBAR and WWT_SCROLL2BAR with NWID_HSCROLLBAR and NWID_VSCROLLBAR. 2010-08-12 09:16:43 +00:00
frosch 71ca58c2bb (svn r20453) -Codechange: Remove direct accesses to Window::hscroll, vscroll and vscroll2.
Note: All windows get individual members with the same names, which are initialised via Window::GetScrollbar(). This caching is not required at all, but simplifies conversion.
2010-08-12 08:37:01 +00:00
frosch 10339c60c0 (svn r20452) -Codechange: Remove NWidgetCore::FindScrollbar() and associate scrollbar explicitly using a NWidgetPart via SetScrollbar(). 2010-08-12 06:44:45 +00:00
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
rubidium 0e078670b7 (svn r20145) -Codechange: keep original RMB->tooltip behaviour when hovering is disabled and there is no handled right click event for the widget, i.e. if a widget would handle the right click you won't see the tooltip anymore by right clicking; by enabling hovering you would get access to that tooltip again. 2010-07-14 17:36:27 +00:00
terkhen 9cf9bb9b92 (svn r20121) -Add: OnHover method for windows. 2010-07-11 11:00:09 +00:00
terkhen 10fbb87823 (svn r20120) -Feature [FS#3913]: Tooltips are shown by hovering the mouse over a widget instead of by right clicking on it. 2010-07-11 10:58:55 +00:00
alberth 268bc7d571 (svn r19888) -Add [FS#3705]: Add highlighting of drag destination in depot gui (sbr). 2010-05-23 15:02:26 +00:00
rubidium 1a5d7b34d8 (svn r19801) -Add [FS#3691]: custom naming of depots. Based on work by sbr 2010-05-12 20:50:10 +00:00
rubidium 5051ef80c6 (svn r19796) -Codechange: introduce and use a {DEPOT} string command 2010-05-12 18:19:36 +00:00
smatz e3c89df398 (svn r19714) -Feature: ctrl+click on a vehicle to start/stop it 2010-04-24 20:55:51 +00:00
smatz 4a9ef6ce60 (svn r19710) -Codechange: deduplicate GUI code for starting/stopping vehicles 2010-04-24 14:29:30 +00:00
frosch 2e90f7f8b9 (svn r19670) -Codechange: Add CeilDiv() and RoundDiv() to simplify integer divisions with rounding. 2010-04-18 14:56:05 +00:00
frosch 88019e64e1 (svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick(). 2010-01-30 18:34:48 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 2b97f38cd1 (svn r18781) -Codechange: pass the CommandCost to the callback instead of whether it succeeded or not.
-Fix: AIs did update their last cost incorrectly in network games if the cost of the DC_EXEC phase differed from the ~DC_EXEC phase.
2010-01-11 18:46:09 +00:00
alberth 91872aca48 (svn r18588) -Feature [FS#2943]: Add shading and unshading of windows. 2009-12-21 16:24:29 +00:00
alberth 5a083f183e (svn r18580) -Codechange: Use widget information only for setting scrollbar capacity. 2009-12-20 20:08:39 +00:00
rubidium 90b7f0f3cb (svn r18575) -Fix [FS#3393]: unit numbers weren't always fully shown in the depot 2009-12-20 16:42:35 +00:00
peter1138 f49491ddcd (svn r18414) -Fix: In the depot window, 'free' wagons were not drawn resize.step_height apart 2009-12-06 11:46:57 +00:00
rubidium 293dfd7c3e (svn r18322) -Codechange: remove the WDP duplication; no need to tell the same twice. 2009-11-28 14:42:35 +00:00
rubidium 14300d309c (svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions 2009-11-24 18:05:55 +00:00
rubidium 69b6d9309a (svn r18274) -Codechange: remove the unused WDF flags 2009-11-24 17:28:29 +00:00
alberth bfd5cc456a (svn r18231) -Fix: Enable filling of matrix widget in the depot gui. 2009-11-22 18:29:52 +00:00