Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
1 year ago
Rubidium
836541b41c
Codechange: use SetDParam and CopyOutDParam for tooltips
1 year ago
Rubidium
820fe8c621
Codechange: use std::string and concatenation when combining multiple formatted strings
1 year ago
Peter Nelson
f177ce7c9a
Codechange: Base CargoArray off std::array.
...
This avoids needing to define array accessors and allows use of
default value initialization.
1 year ago
PeterN
385b25df63
Fix #10819 , Fix #10811 : GetVehicleFromDepotWndPt used widget- instead of window-relative positions. ( #10820 )
...
Pass window-relative positions instead, and adjust for relative positions where needed within the function itself. This simplifies calling code.
1 year ago
Peter Nelson
531d1ae8bc
Codechange: Use GetScrolled(Row/Item)FromWidget in more places.
...
In many instances the clicked row position is 'manually' calculated
instead of using the GetScrolledRowFromWidget helper function, with
variations on checks. Replace with the two helpers where possible.
1 year ago
Peter Nelson
d2034d9c38
Codechange: Scrollbar methods now accept size_t.
...
This clears up a lot of casts from size_t to int.
1 year ago
Peter Nelson
f1d0a26324
Codechange: Remove STR_TINY_BLACK_DECIMAL.
1 year ago
Peter Nelson
e18f688db5
Codechange: Remove various COMMA strings.
1 year ago
Bernard Teo
8a78fa7121
Feature: Contextual actions for vehicles grouped by shared orders ( #8425 )
2 years ago
PeterN
53682b4b6b
Fix #10114 : Wonky depot layout. ( #10191 )
...
Depot lists internal layout was not handled well. This is improved by
throwing more Rects at it:
- Vehicle images are now be vertically centred in the rect.
- Image clipping is relaxed to cover the rect, improving larger sprites.
- Outline highlight is now aware of bevel thickness.
2 years ago
Peter Nelson
ed60c88b0a
Change: Use power-of-2 scaling for some dimensions in GUI.
...
These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Michael Lutz
41fa16f325
Codechange: Don't use globals for return values from vehicle command procs.
3 years ago
Michael Lutz
8503854655
Codechange: Pass unpacked command arguments to command callbacks (except Script).
3 years ago
Michael Lutz
6fe445e6c0
Codechange: Un-bitstuff station/depot/waypoint commands.
3 years ago
Michael Lutz
21675ec7e2
Codechange: Un-bitstuff vehicle/engine commands.
3 years ago
Michael Lutz
4f3ea3907e
Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
3 years ago
Michael Lutz
eab18f06a4
Codechange: Pass additional data as byte stream to command callbacks.
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
4fc055d6e9
Codechange: Align parameter order of command callbacks to command handlers.
3 years ago
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Peter Nelson
7385e780ac
Cleanup: nested_array should not be accessed directly.
...
Replace accesses with GetWidget() as documented.
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
glx22
994bf19aef
Fix f6d5c01: Delay deletion when closing windows
3 years ago
Rubidium
bb9121dbd4
Fix: comparison of narrow type to wide type in loop (potential for infinite loops)
3 years ago
Charles Pigott
6af49b7885
Fix #8724 : Got wrong DepotID/StationID for airports, causing crash
4 years ago
Charles Pigott
3af407340e
Fix #8349 : Close depot vehicle list windows when closing the depot window
4 years ago
frosch
5bfcd742b8
Change: Relocate rename and location buttons in all windows.
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
glx
1f6b3a37f9
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago
Alexander Weiss
b3dc90af58
Change: Clone tool in depot window now behaves like clone button in vehicle window. Keep the tool active when share-cloning. Open the vehicle GUI when copy-cloning. ( #6754 )
6 years ago
frosch
42392fd7b5
(svn r27938) -Fix (r27899): When scrolling in the train depot, also scroll the tile separators.
7 years ago
frosch
c14f23a03d
(svn r27937) -Change: When train depots have a horizontal scrollbar, allow scrolling 1 tile beyond the longest train, so you can actually attach a wagon at the end.
7 years ago
frosch
61c68f906d
(svn r27899) -Feature: Draw vertical separators at tile distance in the train depot GUI. This only applies if all vehicles use consistent lengths, i.e. either if only using default vehicles, or if only using NewGRF vehicles with 32px reference width. (based on patch by Wolf01)
7 years ago
frosch
b4b98e5165
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
7 years ago
frosch
ddc9205212
(svn r27630) -Codechange: Deduplicate code to attach vehicle to cursor.
8 years ago
frosch
3cb7d9703b
(svn r27628) -Codechange: Prepare for drawing cursors consisting of multiple sprites.
8 years ago
frosch
7d4754a4f8
(svn r27583) -Fix [FS#6415]: Do not decrease the column width of depot windows when vehicles with high unitnumbers leave. (Airbus)
8 years ago
alberth
3ccfc954f3
(svn r27450) -Feature[FS#6391](r27446): Lower the sell-chain button in the train depot GUI while dragging a vehicle over it. (Eearslya)
9 years ago
frosch
f6891ac30e
(svn r27446) -Feature: Lower the sell-vehicle button in the depot GUI while dragging a vehicle over it. (Eearslya)
9 years ago
frosch
a8080b6256
(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad().
10 years ago