summaryrefslogtreecommitdiff
path: root/station_gui.c
AgeCommit message (Collapse)Author
2006-12-30(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a ↵Darkvater
parent. If the query has no parent (eg give money, rename waypoint), the global function HandleOnEditText is used.
2006-12-26(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate ↵Darkvater
debugging levels to use in debug.h. grfmsg() is now used as a specific debug-function for grf.
2006-12-09(svn r7446) -Feature: Double the length of the cargo and rating indicators ↵Darkvater
in the station list window, thanks for the inspiration Rince. Workings of the small 1-pixel wide bar have changed a little. Up till now it was pretty random, now it is only drawn for stations with minimal amount of cargo (<=30) and 1-pixel height is 5 units.
2006-12-09(svn r7445) -Codechange (r4822): Properly draw the cargo colours in the ↵Darkvater
station list and centre the cargo abbreviations. The window at least looks a lot better this way.
2006-12-09(svn r7444) -Codechange: Use one (global) cargo-colours array for drawing ↵Darkvater
cargo-colours. Change Food colour to pink everywhere (fixes FS#303)
2006-12-08(svn r7432) -Fix(r7413) : The NO(cargo waiting) button of the StationList ↵belugas
Window is now part of the cargo selection scheme. Again.
2006-12-07(svn r7428) -Codechange: Give a more explicit name to the enum ↵belugas
STATIONLIST_WIDGET_CARGONONE. It is not "No Cargo selected", but rather station with no cargo waiting, thus STATIONLIST_WIDGET_NOCARGOWAITING. Hoping it is now clearer for everyone (mainly me...). Will fix the behaviour next time.
2006-12-07(svn r7413) -Fix[FS#386,#412]: Station list window NONE button now behaves ↵belugas
correctly. -Fix: Clicking on SORT button (same window) does not reset everything anymore. -Featurette: cargo, NONE and both ALL buttons are now shown fully down on pressed, as the text is deported by one pixel on y and y Some widgets enum and code clean-up
2006-12-05(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to ↵matthijs
GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
2006-11-18(svn r7209) -Codechange: Alter position of scroll bar in the station list; ↵peter1138
the filter line isn't scrollable...
2006-11-18(svn r7205) -Fix [FS#350, SF#1560913]: Window allocation and deletion messed ↵Darkvater
with the actual window structs inside their array, and possibly invalidating pointers higher up. Meaning that any function called within an wndproc could cause unknown/invalid pointers once control was returned to this function. Solved by the introduction of an extra abstraction layer, an array of z-window positions that is only concerned with the pointers.
2006-11-10(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc ↵Darkvater
positioning WDP_AUTO = -1)
2006-11-06(svn r7080) -Codechange: Remove negative array indexes, and only add ", " ↵peter1138
when needed, when building station acceptance lists.
2006-10-31(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive ↵Darkvater
information from invalid players (eg spectators) which could lead to crashes.
2006-10-24(svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL ↵Darkvater
is only plain panel, WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2 because that is what it is. Added WWT_PUSHBTN that is either just a pushable button, or a textbutton, which text's drawn dynamically independent of widget.
2006-10-21(svn r6884) -Codechange: Add strict bounds checking in string formatting system.Darkvater
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
2006-10-20(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use ↵peter1138
the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
2006-10-04(svn r6639) -CodeChange : Conversion of SetWidgetLoweredState to ↵belugas
SetWindowWidgetLoweredState, in order to follow pre-established standard
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 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 r6381) -Cleanup: make the '/* */' comments that span multiple lines ↵rubidium
more uniform. -Cleanup: whitespace alignment of a few tables.
2006-08-27(svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() ↵Darkvater
which should be integral to strings.c
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 r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips ↵truelight
invalid ones -Codechange: use IsValidXXX where ever possible Note: both changes to prepare for new pool system, which needs those changes. For every pool there are 2 ugly lines, which will be removed when done implementing new pool system. Based on FS#13 by blathijs, partly implemented.
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-19(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for ↵truelight
textboxes to only allow certain patterns (like numbers only)
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 r5896) Remove pointless indirection similar to r5894 and remove an ↵tron
unnecessary global variable
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-05-16(svn r4891) - Fix (r4822): The station list window had some overlapping ↵Darkvater
widgets (peter1138)
2006-05-11(svn r4830) - Codechange: simplify station sorting a bit by recalculating ↵Darkvater
the clicked-states on drawing the window. This also allows the 'Sort by' button to be visually clickable
2006-05-11(svn r4823) -Fix: Improved tooltips for sortable station lists.celestar
-Credit: Chrishuebsch for initial idea and implementation of station filters
2006-05-11(svn r4822) -Feature: Station List View can now be sorted and filtered (by ↵celestar
waiting cargo type and facilities)
2006-04-15(svn r4426) Code Cleaning : replacing tabs with spaces, removing obvious ↵belugas
comments, aligning arrays etc...
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-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-14(svn r3180) Replace some magic numbers by symbolic namestron
2005-11-13(svn r3172) static, consttron
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-20(svn r3073) int/byte -> EngineID/PlayerID/VehicleIDtron
0/-1 -> INVALID_ENGINE 0x10 -> OWNER_NONE
2005-10-20(svn r3072) CMD_RENAME_STATION isn't interested in the tile coordinates, so ↵tron
don't pass them
2005-10-11(svn r3030) More work for GB/SB, this time concerning the waiting_acceptance ↵tron
attribute of stations
2005-10-07(svn r3024) -Codechange: Another batch of replacements of ↵tron
int/uint/int16/byte/-1 with proper types and constants
2005-10-03(svn r3010) Get rid of quite some dubious casts, either by using GB(), ↵tron
proper types or just removing them
2005-09-30(svn r3001) s/Player*/const Player*/tron
s/byte/PlayerID/ s/int/PlayerID/ and related changes
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron