Darkvater
073e0eb3c9
(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
...
use in debug.h. grfmsg() is now used as a specific debug-function for grf.
18 years ago
Darkvater
7aaca4f515
(svn r7446) -Feature: Double the length of the cargo and rating indicators 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.
18 years ago
Darkvater
34dcdfd849
(svn r7445) -Codechange (r4822): Properly draw the cargo colours in the station list and centre the
...
cargo abbreviations. The window at least looks a lot better this way.
18 years ago
Darkvater
2f3c5a05bb
(svn r7444) -Codechange: Use one (global) cargo-colours array for drawing cargo-colours. Change Food
...
colour to pink everywhere (fixes FS#303)
18 years ago
belugas
d23210e048
(svn r7432) -Fix(r7413) : The NO(cargo waiting) button of the StationList Window is now part of the cargo selection scheme. Again.
18 years ago
belugas
3d0820a184
(svn r7428) -Codechange: Give a more explicit name to the enum 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.
18 years ago
belugas
dc6eca9e16
(svn r7413) -Fix[FS#386,#412]: Station list window NONE button now behaves 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
18 years ago
matthijs
9218fc16e6
(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
18 years ago
peter1138
3f64e50fc9
(svn r7209) -Codechange: Alter position of scroll bar in the station list; the filter line isn't scrollable...
18 years ago
Darkvater
b3c48c0a84
(svn r7205) -Fix [FS#350, SF#1560913]: Window allocation and deletion messed 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.
18 years ago
Darkvater
d50f6c8a8c
(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc positioning WDP_AUTO = -1)
18 years ago
peter1138
701c47fb4a
(svn r7080) -Codechange: Remove negative array indexes, and only add ", " when needed, when building station acceptance lists.
18 years ago
Darkvater
eadf788cc5
(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive information from
...
invalid players (eg spectators) which could lead to crashes.
18 years ago
Darkvater
d303ef94b3
(svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL 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.
18 years ago
Darkvater
ee27bb497c
(svn r6884) -Codechange: Add strict bounds checking in string formatting system.
...
The last parameter should point to the end of the buffer (eg lastof(buf))
Courtesy of Tron.
18 years ago
peter1138
8411b3b9fe
(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
18 years ago
belugas
6444b0e781
(svn r6639) -CodeChange : Conversion of SetWidgetLoweredState to SetWindowWidgetLoweredState, in order to follow pre-established standard
18 years ago
belugas
17eb65050b
(svn r6631) -Codechange: Use accessors for click_state.
...
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
belugas
753b572400
(svn r6619) -Codechange: Use accessors for disabled_state.
...
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
bjarni
4ccdb0686f
(svn r6562) -Codechange: merged the vehicle list window widget arrays
...
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
18 years ago
belugas
1c56a5ae0f
(svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
18 years ago
rubidium
63687763e9
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
...
-Cleanup: whitespace alignment of a few tables.
18 years ago
Darkvater
2f6a4bc1a9
(svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() which should be
...
integral to strings.c
18 years ago
truelight
5fd9aeb12b
(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
...
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
18 years ago
truelight
0461d89612
(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips 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.
18 years ago
rubidium
480af9c917
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
18 years ago
truelight
83d56d6d79
(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
...
allow certain patterns (like numbers only)
18 years ago
Darkvater
b13a60db42
(svn r5910) Fix some more warnings on MSVC by using (void*) casts. Followup of r5907.
18 years ago
tron
4ad8d1c7a2
(svn r5907) Remove more indirection by using pointers instead of IDs. Also fix some bogus warnings on MSVC by using (void*) casts
18 years ago
tron
68c2a77910
(svn r5896) Remove pointless indirection similar to r5894 and remove an unnecessary global variable
18 years ago
rubidium
243872b4fd
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
...
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
Darkvater
3abc59ebfa
(svn r4891) - Fix (r4822): The station list window had some overlapping widgets (peter1138)
19 years ago
Darkvater
ca20c1fa90
(svn r4830) - Codechange: simplify station sorting a bit by recalculating the clicked-states on drawing the window. This also allows the 'Sort by' button to be visually clickable
19 years ago
celestar
c6fd0c3a46
(svn r4823) -Fix: Improved tooltips for sortable station lists.
...
-Credit: Chrishuebsch for initial idea and implementation of station filters
19 years ago
celestar
48d991b819
(svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities)
19 years ago
belugas
88e0bab283
(svn r4426) Code Cleaning : replacing tabs with spaces, removing obvious comments, aligning arrays etc...
19 years ago
peter1138
1c57091230
(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing.
19 years ago
tron
f7abff5f96
(svn r3181) -Bracing
...
-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
19 years ago
tron
d8b56c123e
(svn r3180) Replace some magic numbers by symbolic names
19 years ago
tron
ee15e3de13
(svn r3172) static, const
19 years ago
tron
47137cefb7
(svn r3078) Some more stuff, which piled up:
...
- 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
19 years ago
tron
2b91f55b32
(svn r3073) int/byte -> EngineID/PlayerID/VehicleID
...
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
19 years ago
tron
6a5c0fabdd
(svn r3072) CMD_RENAME_STATION isn't interested in the tile coordinates, so don't pass them
19 years ago
tron
9fea263c77
(svn r3030) More work for GB/SB, this time concerning the waiting_acceptance attribute of stations
19 years ago
tron
3397e202c8
(svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants
19 years ago
tron
db3b1228bf
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
19 years ago
tron
ed8c9c91d6
(svn r3001) s/Player*/const Player*/
...
s/byte/PlayerID/
s/int/PlayerID/
and related changes
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
19 years ago