summaryrefslogtreecommitdiff
path: root/train_gui.c
AgeCommit message (Collapse)Author
2006-09-04(svn r6379) -Codechange: cast 'remove babel' on widget's unkA and rename it ↵Darkvater
to 'data'.
2006-09-03(svn r6370) -Codechange: moved all the remaining setup for ↵bjarni
PlayerVehWndProc() into WE_CREATE
2006-09-03(svn r6359) -Fix: Do not reset the current cursor action when centering on a ↵tron
depot/hangar (noticed by Neonox)
2006-09-03(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as ↵tron
large as any type of destinataion (StationID, DepotID, WaypointID) it can hold DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
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 r6280) -Codechange: Use the same naming for trains as for other vehicles:Darkvater
CMD_SEND_TRAIN_TO_DEPOT instead of CMD_TRAIN_GOTO_DEPOT
2006-08-31(svn r6277) Clean up the train details drawing routinetron
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 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 r6184) Remove the unused (because it was NULL in all callers) second ↵tron
parameter of FillDrawPixelInfo() and simplify some expressions
2006-08-28(svn r6181) -Fix r6161: The list of vehicles using a certain station got a ↵bjarni
bit of display code mixed up with the list of vehicles with shared orders (nycom)
2006-08-27(svn r6168) -Code cleanup r6161: removed a newline and added a tab. Thanks ↵bjarni
TrueLight
2006-08-27(svn r6167) -Code cleanup r6161: replaced some uint16 with OrderID and (1 << ↵bjarni
8) with SHARE_FLAG
2006-08-27(svn r6165) -Feature: control click Goto Depot will now make the vehicle servicebjarni
at the depot and leave right away. To tell the difference the status of stopping vehicles will be in red, while servicing vehicles will be green. -Codechange: remove some dead code in CmdSendAircraftToHangar() since it is conflicting with new functionality. Now p2 means the same for all types
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 r6046) CodeChange : Rename WWT_5 Widget type to WWT_LABEL : a centered ↵belugas
label CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL. Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
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-20(svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant.rubidium
2006-08-19(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for ↵truelight
textboxes to only allow certain patterns (like numbers only)
2006-08-16(svn r5926) -Codechange: make _cur_year contain the full year, instead of ↵rubidium
the offset since 1920 -Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
2006-08-15(svn r5918) -Cleanup: rename ConvertDayToYMD/ConvertYMDToDay as they really ↵rubidium
convert a Date to/from a YearMonthDay. -Cleanup: swap ConvertDateToYMD's parameters to make the order consistent with the name of the function.
2006-08-15(svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and ↵rubidium
BASE_YEAR when comparing _cur_year with a 'full' year. -Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15(svn r5910) Fix some more warnings on MSVC by using (void*) casts. Followup ↵Darkvater
of r5907.
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-12(svn r5853) -Fix: [elrails] FS#178 Electric Trains can leave Conventional Depotbjarni
now the user will get an error if he tries to start the train and the status bar will say "no power" instead of "stopped" Electric trains already driving in and out of non-electrified depots will still do so, but you can't start new ones
2006-07-26(svn r5609) CodeChange : Apply coding stylebelugas
2006-06-28(svn r5404) Fix (r5391) : Yet another typo. Nothing specatular :)belugas
Spotted by gigajum
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-06-20(svn r5318) - Allow room for a single pixel overflow on the first engine ↵peter1138
when drawing a train's image. - Draw the depot highlight box after drawing all engines on a line, so that the box isn't hidden.
2006-06-18(svn r5309) Partially fix the rail header dependency fiasco: rail_map.h now ↵tron
depends on rail.h and not the other way round anymore
2006-06-11(svn r5225) Some windows periodically check if their parent exists - if not ↵tron
they close themselves This is unnecessary, because their parents already close them when they get closed Therefore remove the code for the periodic checks
2006-06-10(svn r5210) Many small changes which piled up: const, unsigned, variable ↵tron
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
2006-06-04(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. ↵tron
_new_vehicle_id is enough.
2006-05-30(svn r5046) - Implement smooth horizontal depot scrolling by setting up a ↵peter1138
clipping area to draw the train image. This fixes a couple of usability issues when shorter wagons are used in the depot; shorter wagons scrolled at a different speed, and not all wagons were visible sometimes.
2006-05-21(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID playertron
2006-05-21(svn r4940) Remove the dubious feature of remembering the last built depot. ↵tron
It serves no real purpose except causing confusion
2006-05-14(svn r4869) - NewGRF: support setting train list vehicle width to 32 instead ↵peter1138
of 29 pixels, for sets which use 32 pixel long engines/wagons.
2006-05-14(svn r4868) - Codechange: in the train detail window, don't call ↵peter1138
DrawTrainImage() for each row, as we already loop to find the vehicles to draw. Fixes a potential issue of extraneous wagons being drawn, if they are very short.
2006-05-08(svn r4781) - NewGRF: give _traininfo_vehicle_pitch a proper declarationpeter1138
2006-04-28(svn r4610) - If a wagon has a capacity of 0 (zero), display it in the ↵peter1138
purchase list as N/A.
2006-04-23(svn r4562) - NewGRF: Add additional vehicle text to train engine and wagon ↵peter1138
purchase information. Other vehicle types to come.
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-08(svn r4322) - Codechange: Remove conversion of kmh to mph from gui code to ↵peter1138
within the units conversion system, in string.c. This means displaying kmh requires no conversion, instead of being convert from kmh to mph, and then back to kmh again.
2006-03-31(svn r4211) - Removed measuring units from the names of two strings.peter1138
- Use {POWER} and {WEIGHT_S} tags for all strings instead of "{COMMA}units".
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.