summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
AgeCommit message (Collapse)Author
2006-09-23(svn r6499) -Codechange: Finally, got "byte event" outside of the union ↵belugas
WindowEvent, which is now a struct
2006-09-08(svn r6431) -Fix r6424: removed a declaration after statement in ↵bjarni
ReplaceVehicleWndProc()
2006-09-08(svn r6429) -Fix: [autoreplace GUI] selecting an empty line will now ↵bjarni
deselect the engine instead of selecting the first in the list (consistent with all other windows) -Fix: [autoreplace GUI] engine info is now drawn in the right side even if the left list is empty
2006-09-08(svn r6428) -Codechange: [autoreplace] removed duplicated code to draw the ↵bjarni
info text in the autoreplace window
2006-09-08(svn r6424) -Codechange: [autoreplace] removed a loop though all vehicles ↵bjarni
from each time the window is redrawn To do this, the player struct contains an array, that contains the count of each engine type that the player owns Those arrays are updated each time a vehicle is build or deleted and is calculated on load (it's not saved) It's possible to access the arrays outside of the autoreplace GUI, so feel free to read from them in other patches as well
2006-09-07(svn r6418) -Fix: [autoreplace] now multiheaded engines and other ↵bjarni
locomotives consisting of more than one unit will only be counted once This also cleaned up the counting loop alot and it will also (hopefully) be faster (didn't benchmark it)
2006-09-04(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines ↵rubidium
more uniform. -Cleanup: whitespace alignment of a few tables.
2006-09-04(svn r6379) -Codechange: cast 'remove babel' on widget's unkA and rename it ↵Darkvater
to 'data'.
2006-09-04(svn r6378) -Codechange: Rename VLW_FLAGS to VLW_MASK as it is a maskDarkvater
2006-09-04(svn r6377) -Codechange: Set up the widgets in the WE_CREATE instead of on ↵Darkvater
every WE_PAINT -Codechange: Initialize sorting-type on WE_CREATE instead of checking every time. -Codechange: Update custom vehiclelist_d with standard list_d struct, more static
2006-09-03(svn r6372) -Codechange: static, unneeded decleration in headers, ↵Darkvater
superfluous header includes -Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
2006-09-03(svn r6370) -Codechange: moved all the remaining setup for ↵bjarni
PlayerVehWndProc() into WE_CREATE
2006-09-02(svn r6350) -Codechange: moved some setup stuff into WE_CREATE in ↵bjarni
PlayerVehWndProc() This is possible now that the window number is known when running WE_CREATE and it's a nicer solution
2006-09-01(svn r6291) -Feature: Vehicle lists from the station window now also got the ↵bjarni
goto depot button -Codechange: unified the code for mass goto depot to avoid duplicated code -Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
2006-08-31(svn r6283) -Code cleanup: fixed wrong indent in PlayerVehWndProc()bjarni
2006-08-31(svn r6282) -Codechange: made a function to create the vehicle list for ↵bjarni
vehicle list windows this list is also used by mass goto depot to ensure that they use the same vehicles right now only the list of all vehicles use this for goto depot, but eventually all the types will use this
2006-08-31(svn r6271) Remove stale commenttron
2006-08-31(svn r6270) Remove the "unsorted" vehicle sorter, because it's plain uselesstron
2006-08-31(svn r6269) -Fix r6240: fixed incorrect row count in vehicle lists when ↵bjarni
resizing to smaller windows (AsterixMG)
2006-08-31(svn r6261) -Fix r6246: fixed sprite related crash related to other player's ↵bjarni
vehicle list windows (spotted by Darkvater)
2006-08-30(svn r6249) -Fix: fixed assert when pressing goto depot in an empty list ↵bjarni
(forgot to disable the button in this condition) -Code cleanup r6246: simplified SendAllVehiclesToDepot() and moved an { in PlayerVehWndProc()
2006-08-30(svn r6246) -Feature: added the many times requested "send all vehicle to ↵bjarni
depot" button it's located in the vehicle list screen and does the same as in the shared orders window (send all vehicles in list to a depot) it will still not inform the player if a vehicle failed to find a depot, so don't take for granted that all of them go
2006-08-30(svn r6243) -Codechange: made SortVehicleList() static as well since that ↵bjarni
one is not used in any other files either (Thanks Tron for pointing this out)
2006-08-30(svn r6242) -Codechange: made BuildVehicleList static as it is not used in ↵bjarni
any other files anymore added window_type to arguments and used it to replace an if cascade with a switch case
2006-08-30(svn r6241) -Fix r6240: missed altering one line in last commitbjarni
2006-08-30(svn r6240) -Code cleanup: in PlayerVehWndProc: replaced size_of_row with ↵bjarni
w->resize.step_height it was only used twice, so there was no reason to calculate it for each event
2006-08-30(svn r6239) -Code cleanup: cleaned up PlayerVehWndProcbjarni
code to delete an empty shared orders list is now much simpler cleaned up the code to handle button clicks fixed an assert if widget 9 was pressed on a list with vehicles for another company
2006-08-29(svn r6229) -Feature: Shared order lists now got a "goto depot" buttonbjarni
this will try to send all vehicles in the list to depots/hangars currently if one fails to find a depot, it will not tell the player
2006-08-29(svn r6228) -Fix: redrawing an empty list of shared vehicles will now close ↵bjarni
the window Since the order is no more, the player will not need that particular window anymore this could happen if the player opened the window and then sold all the vehicles (or crashed them) A crash could happen if a new order gets the same (now freed) OrderID and the vehicle using it is not of the same type as the window expect
2006-08-29(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProcbjarni
this makes the list type detection much easier and allowed an if cascade to be turned into a switch case this also makes it easier to add more list types
2006-08-29(svn r6215) -Codechange: [vehicle list windows] unified ↵bjarni
Player(vehicle)WndProc into PlayerVehWndProc Those 4 unified functions were really much alike, so there was no reason to have so much dublicated code
2006-08-28(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else ↵rubidium
{' -> '} else {', tabs between code and comment, etc.
2006-08-28(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and ↵rubidium
'/*' or '*/' in '//' style comments.
2006-08-27(svn r6167) -Code cleanup r6161: replaced some uint16 with OrderID and (1 << ↵bjarni
8) with SHARE_FLAG
2006-08-26(svn r6161) -Feature: List of vehicles with the same shared ordersbjarni
the list is available in the orders window and looks like the list buttons from the station windows (small vehicle) The button is disabled if the vehicle do not have any shared orders or it got shared orders, but an empty order list based on a patch by nycom, thought it ended up getting heavily modified Thanks to TrueLight for proofreading and suggestions
2006-08-26(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)truelight
-Codechange: introduced DestinationID, which is in fact an union of several types Used in Order struct, so no longer StationID is abused for all targets. Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
2006-08-22(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 ↵truelight
(or, will do that). It isn't the best name, but we couldn't find any better. This unifies the pool-system even more.
2006-08-22(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-15(svn r5910) Fix some more warnings on MSVC by using (void*) casts. Followup ↵Darkvater
of r5907.
2006-08-15(svn r5907) Remove more indirection by using pointers instead of IDs. Also ↵tron
fix some bogus warnings on MSVC by using (void*) casts
2006-08-14(svn r5895) Remove dead codetron
2006-08-14(svn r5894) Remove a totally unnecessary indirection in the vehicle sorter ↵tron
code. Less code, less data, simply better
2006-08-14(svn r5887) -Cleanup: move date related functions, defines and variables to ↵rubidium
date.[ch] -Cleanup: fix whitespace related coding style issues in date.[ch] -Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-09(svn r5820) - NewGRF: Add support for extra vehicle text in the purchase ↵peter1138
list for road vehicles, aircraft and ships.
2006-06-28(svn r5399) Simplify a conditional expression: (a && b) || (!a && !b) -> a == btron
2006-06-14(svn r5262) Add symbolic names for the aircraft subtypes. not perfect, but ↵tron
better than raw numbers
2006-04-23(svn r4561) - NewGRF: implement most of callback 0x23: additional text in ↵peter1138
vehicle purchase windows.
2006-04-10(svn r4343) [Autoreplace] Fix drawing of train list for outdated engines. ↵peter1138
Fixes FS#106
2006-04-01(svn r4229) [elrail & autoreplace] Always show compatible rail vehicles in ↵peter1138
the left list, and only the selected rail type in the right list, to allow converting electric engines to non-electric.
2006-03-31(svn r4201) - Codechange: Do for _engine_info[] what we do for ↵peter1138
_*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.