summaryrefslogtreecommitdiff
path: root/order_gui.c
AgeCommit message (Collapse)Author
2007-01-02(svn r7759) -Merge: makefile rewrite. This merge features:rubidium
- A proper ./configure, so everything needs to be configured only once, not for every make. - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies. - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC. - Proper support for OSX universal binaries. - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files. - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files. Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
2006-12-05(svn r7366) -Fix: Out of bounds widget access when accessing orders window ↵Darkvater
of other players.
2006-12-04(svn r7355) -Codechange: replace 'for (i = 0; w->widget[i].type != WWT_TYPE; ↵rubidium
i++)'-type for loops with 'for (i = 0; i < w->widget_count; i++)'-type for loops
2006-11-11(svn r7129) -Codechange: Get rid of a global variable that only sets a ↵Darkvater
window's number.
2006-11-10(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc ↵Darkvater
positioning WDP_AUTO = -1)
2006-11-02(svn r7046) -Fix [FS#311]: 'Goto' button in orders window got depressed ↵Darkvater
along with all other buttons when an existing order was modified (GrimRC)
2006-10-27(svn r6971) -Fix r6961: WWT_NODISTXTBTN buttons were normal buttons not push ↵glx
buttons
2006-10-27(svn r6962) -Fix r6961: spacing...Darkvater
2006-10-27(svn r6961) -Codechange: Remove relic from r212 WWT_NODISTXTBTN which was ↵Darkvater
originally used to not to allow clicking if a button was disabled. This has been superseded in r212 with general code that doesn't allow any click events for disabled buttons.
2006-10-24(svn r6938) -Codechange: Comments, typo, variable naming, whitespace, ↵Darkvater
strecpy and simplification of order_gui (only disable a single widget if not local player, all others aren't visible anyways).
2006-10-24(svn r6922) -Feature: Add proper cloning sprites and cursors, different for ↵Darkvater
each vehicle. Big thanks to MB for the initial design and skidd13 for the iconified version(s). -Codechange: Change the autorenew sprites from recycle to upgrade (skidd13) -Codechange: Change the shared orders icon (MeusH) -Add missing table/files.h file to VS project file.
2006-10-08(svn r6696) -Codechange: changed all comparision for refit cargo in orders ↵bjarni
against CT_NO_REFIT to checks for valid cargo IDs This should prevent any bugs made by mixing up CT_NO_REFIT and CT_INVALID
2006-10-03(svn r6631) -Codechange: Use accessors for click_state.belugas
Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-10-03(svn r6627) -Fix r6624: fixed some warningsbjarni
Now it happened again. Somebody got warnings, that I didn't get... I will look into this issue
2006-10-03(svn r6624) -Feature: added ability to add refit commands to vehicle orders ↵bjarni
(can only be done in goto depot orders) Example: make a train transport iron ore from A to B, then it visits a depot and refits to steel It then transport steel back to A or near A if there is a factory and then it visits another depot to refit to iron ore again This is controlled in the orders. If a goto depot order is lightlighted, then "Unload" changes to "Refit" Control click "Refit" removes the refit part of the order (as the tooltip says) The player will still pay the normal refit costs Known issues: If a vehicle is not in a depot, then the refit window will fail to tell refitted cargo capacity Refit costs in the refit window can sometimes print 0 when it should not because the refit calculation is unaware that the vehicle will be refitted in between Warning: autoreplace got a protection against replacing something so you get a new cargo type, but it can fail here. In the iron ore/steel example, it can see that the vehicle carries iron ore and the new one can be refitted to iron ore, then it will replace. It will not check to see that it's valid for steel as well. This is something to look into in the future
2006-10-03(svn r6619) -Codechange: Use accessors for disabled_state.belugas
Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-09-28(svn r6562) -Codechange: merged the vehicle list window widget arraysbjarni
It made no sense to maintain 8 nearly identically arrays when a single one can do the job Also made the two buttons always use half of the bottom width each, even when resizing
2006-09-23(svn r6499) -Codechange: Finally, got "byte event" outside of the union ↵belugas
WindowEvent, which is now a struct
2006-09-04(svn r6379) -Codechange: cast 'remove babel' on widget's unkA and rename it ↵Darkvater
to 'data'.
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-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 r6052) -Codechange: change OrderType (order->type) in a typedeftruelight
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better -Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
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-07-27(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() ↵tron
instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
2006-07-26(svn r5609) CodeChange : Apply coding stylebelugas
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
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-05-09(svn r4789) - Codechange: rename RoadType to RoadTileType and ↵rubidium
ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency
2006-05-09(svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and ↵rubidium
RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity
2006-03-31(svn r4200) -Codechange: Make use of water map accessors when getting the ↵celestar
Index of a Ship Depot. TODO: Store the depot index in the map
2006-03-31(svn r4195) - Codechange: Initialize order variables to avoid a compiler ↵peter1138
warning. These are unused anyway... (smells of r3476-7, but not the same)
2006-03-26(svn r4120) Use the new station functions where appropriatetron
2006-03-24(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the ↵tron
station from a tile
2006-03-19(svn r3981) More work for the rail accessing functions and enumstron
2006-03-05(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-schemetron
2006-02-23(svn r3660) Convert further road bits and type references to the functions/enumstron
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-01-29(svn r3477) -Fix: a fix that fixed the last commit.. I shouldn't be ↵truelight
committing here :)
2006-01-29(svn r3476) -Fix: fixed a warning from the OSX compiler, it is bogus, but oh ↵truelight
well
2005-12-21(svn r3325) - Fix: You couldn't send an airplane to a hangar for mandatory ↵Darkvater
servicing, the NON_STOP flag failed the command.
2005-12-07(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect ↵peter1138
their actual use, and add "Close Window" tooltip where missing.
2005-11-18(svn r3218) -Feature: Multiheaded train engines will now stay in the same trainbjarni
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead This fixes the assert when moving multiheaded engines (introduced in r3144) Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs -Codechange: train subtype is now a bitmask This allows fast access to info like if it is a wagon or engine and if it is in front and so on Note: savegame version bump
2005-11-16(svn r3210) -Codechange: use IsRailWaypoint where possible (instead of ↵truelight
magicnumbers) -Codechange: IsRailWaypoint should take 'tile', not 'm5'
2005-11-15(svn r3185) consttron
2005-11-14(svn r3181) -Bracingtron
-Indentation -Whitespace -DeMorgan's Law -Test with NULL or 0 for non-booleans -'\0' instead of 0 for chars -Remove redundantly redundant comments (like DoFoo(); // Do foo) -Join multiple short lines with a single statement -Split single lines with multiple statements -Avoid assignments in if
2005-11-13(svn r3173) Use the trinary operator and switch to improve readabilitytron
Also align short cases nicely
2005-10-23(svn r3078) Some more stuff, which piled up:tron
- const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up