PeterN
4894da67da
Codechange: Pass bridge type instead of display row to BuildBridge. ( #10828 )
2023-05-14 19:12:26 +00:00
PeterN
23ce42ad91
Codechange: Use std::move for bridge list. ( #10821 )
...
This follows the pattern for dropdown lists, and avoids new/delete and pointers.
2023-05-14 08:22:09 +01:00
Peter Nelson
941dbadf9e
Codechange: Add and use GetScrolledItemFromWidget to get a list item.
...
This function returns an iterator, either to the selected item or the
container's end.
This makes handling the result more robust as indices are not used.
2023-05-12 21:45:32 +01:00
Peter Nelson
d2034d9c38
Codechange: Scrollbar methods now accept size_t.
...
This clears up a lot of casts from size_t to int.
2023-05-07 20:25:44 +01:00
PeterN
f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. ( #10594 )
...
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2023-04-08 12:26:13 -04:00
Francis Herne
01be423237
Fix #10362 : NewGRF bridges without speed limits.
...
For bridges, a max speed of 0xFFFF (i.e. no effective limit)
is no longer displayed as a limit in the UI.
A max speed of 0 is also considered unlimited, for similarity to the
roadtype and railtype interface.
2023-01-19 22:24:33 +01:00
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2022-11-12 18:28:39 +00:00
Peter Nelson
6f95e04005
Change: Use Rect helpers for widget drawing.
...
This replaces repetitive and sometimes unwieldy use of constants.
2022-11-12 18:28:39 +00:00
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
2022-02-02 21:30:15 +01:00
Michael Lutz
8503854655
Codechange: Pass unpacked command arguments to command callbacks (except Script).
2021-12-16 22:28:32 +01:00
Michael Lutz
46bd2f1ced
Codechange: Un-bitstuff remaining transport infrastructure commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
eab18f06a4
Codechange: Pass additional data as byte stream to command callbacks.
2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
Michael Lutz
e740c24eb7
Codechange: Template DoCommand 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.
2021-12-16 22:28:32 +01:00
Michael Lutz
4fc055d6e9
Codechange: Align parameter order of command callbacks to command handlers.
2021-12-16 22:28:32 +01:00
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
2021-12-16 22:28:32 +01:00
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
2021-12-16 22:28:32 +01:00
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
2021-12-16 22:28:32 +01:00
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
2021-05-29 21:08:25 +02:00
glx22
994bf19aef
Fix f6d5c01
: Delay deletion when closing windows
2021-05-29 21:08:25 +02:00
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
2021-02-20 19:01:04 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
2020-12-15 00:29:30 +01:00
TrevorShelton
a4a9908a51
Fix #8221 : Missing specific error message for bridge too long ( #8240 )
2020-06-28 12:53:56 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
2019-09-07 17:37:01 +01:00
peter1138
c02ef3e456
Feature: Add NotRoadTypes (NRT)
2019-05-01 21:36:27 +02:00
glx
2db88953e7
Codechange: use std::sort() in GUIList
2019-04-13 12:49:18 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
2019-03-28 00:09:33 +01:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
Henry Wilson
097328c3d7
Codechange: Replaced SmallVector::Get() const with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
2019-03-26 20:15:57 +00:00
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
2019-03-24 16:10:04 +01:00
Peter Nelson
bf8d7df736
Change: Extend rail types to 64 (6 bit storage)
2018-07-26 13:27:40 +01:00
peter1138
0877f892c5
(svn r26960) -Codechange: Draw sort button symbols as sprites, and pad sort buttons with non-static width.
2014-10-05 11:20:02 +00:00
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-23 20:13:33 +00:00
michi_cc
b911f4a452
(svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers.
2013-08-05 20:36:24 +00:00
frosch
c1bf3122ad
(svn r25543) -Cleanup: Make the bridge and object picker not restore their previous size, but the previously saved size.
2013-06-30 14:39:09 +00:00
frosch
43ec0bf0c1
(svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size.
2013-06-30 14:36:31 +00:00
frosch
98fdd20f84
(svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX widgets.
2013-06-30 14:32:31 +00:00
frosch
4e4e635916
(svn r25294) -Feature: Add another button to window title bars to resize the window to its default size.
2013-05-26 19:30:07 +00:00
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
2013-05-26 19:25:01 +00:00
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
2013-05-26 19:23:42 +00:00
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
2013-01-08 22:46:42 +00:00
frosch
3ce8d2ce70
(svn r24846) -Add: Advanced settings to disable certain sound effects.
2012-12-23 21:09:09 +00:00
truebrain
e9f584ac21
(svn r23531) -Codechange: document and rename widgets to be consistent and understandable
2011-12-16 16:27:45 +00:00
truebrain
2aa774e831
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
2011-12-15 22:22:55 +00:00
rubidium
58423b26d1
(svn r23474) -Codechange: move the declaration error related functions to error.h
2011-12-10 13:54:10 +00:00
rubidium
7b418502ab
(svn r22700) -Fix [FS#4680]: cost of changing bridge type is undercalculated when adding road types as well (based on patch by adf88)
2011-07-30 14:10:12 +00:00