summaryrefslogtreecommitdiff
path: root/src/rail_gui.cpp
AgeCommit message (Collapse)Author
2021-01-08Fix 85a49a0d3: hotkeys were enabled outside of GM_NORMAL (#8534)Patric Stout
2021-01-08Change: always allow to click on the toolbar icons for road/rail/dock/airportPatric Stout
This change allows a user to see what is available and what will become available before it is available, instead of only disabling the button with no further explanation. It also always allows building roads and canals, even if no vehicles are available for road / water. For rail/road/tram, a dropdown with available types is shown. If none are available, it reads "None". If the type is not yet available, it is greyed out. For dock/airport, this always open the toolbar, but building airports, docks, and depots buttons are disabled till vehicles are available for those. Road is the only exception, with the primary road always being available. Here too, stations and depots are disabled till vehicles become available. It does mean you can now always build roads to for example help towns grow.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2021-01-07Feature: option to auto remove signals when in the way during rail ↵Kuhnovic
construction (#8274)
2020-07-27Fix: Properly invalidate mouse-over station coverage highlight (#8263)Łukasz Hryniuk
2019-12-23Fix: Setting the default railtype to 'first/last available' did not work ↵frosch
with NewGRF defined railtypes.
2019-12-23Codechange: Use RAILTYPE_BEGIN instead of RAILTYPE_RAIL when the intention ↵frosch
is iteration.
2019-12-23Codechange: Use a switch with fall-through instead of a if-sequence with ↵frosch
context data between cases.
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-07Fix #7188: check the validity of command callback for scripts (#7701)glx22
2019-05-01Feature: Add NotRoadTypes (NRT)peter1138
2019-04-25Feature: Add existing station coverage area display when placing new station ↵peter1138
parts.
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Codechange: Switch DropDownList to directly use std::vector, thus making ↵Michael Lutz
AutoDeleteSmallVector obsolete. DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate copy-free code for most situations.
2019-03-31Change: Shorten engine rail type drop down in autoreplace window. (#7448)PeterN
In the autoreplace window, the rail type drop down is for choosing engines of the given time. Many rail types do not have engines specifically designed for them, and are merely compatible with other rail types. This list is thus unwieldy and many options have no engines available. As this drop down is for choosing _engine_ rail type rather than compatible rail types, we can list just the rail types explicitly listed by engines.
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-24Codechange: Use override specifier in Window-derived classes.peter1138
2019-03-10Feature: Add rail icon to rail construction drop down list.peter1138
2019-03-09Add: windowshade for rail station construction windowAndy
2019-01-11Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust ↵Peter Nelson
timers to work with milliseconds instead of ticks.
2018-07-26Change: Extend rail types to 64 (6 bit storage)Peter Nelson
2018-06-06Codechange: Change element type used for rail type usage stats array in ↵Jonathan G Rennison
SetDefaultRailGui The array is rail type sized in terms of number of elements. Each element should be a unsigned integer, not a rail type itself. This fixes runtime warnings reported by UndefinedBehaviorSanitizer.
2016-12-25(svn r27710) -Change: Limit waypoint area by maximum station spread already ↵frosch
when dragging. (adf88)
2016-12-08(svn r27683) -Change: Rearrange the autoreplace GUI for trains, and do not ↵frosch
filter it by railtype by default.
2016-05-22(svn r27571) -Codechange: Consistent naming for command callbacks which play ↵frosch
a sound effect.
2016-04-19(svn r27547) -Fix: Use a more appropiate sound effect for convert-rail. ↵frosch
(andythenorth)
2015-10-30(svn r27427) -Fix: Use the NewGRF railtype sorting order in the ↵frosch
infrastructure window.
2015-02-22(svn r27163) -Fix [FS#6204]: Toolbars were not invalidated when changing ↵frosch
max-vehicles settings. (adf88)
2015-02-01(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ↵frosch
ScaleGUITrad().
2014-09-22(svn r26906) -Codechange: Scale depot and station picker buttons by GUI zoom ↵peter1138
level.
2014-06-10(svn r26640) -Cleanup: Remove some pointless STR_JUST_STRING detours.frosch
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-03-23(svn r26422) -Fix [FS#5946]: Some road constructions used the rail sound ↵frosch
effect. Rename the enum items to properly reflect their purpose.
2014-02-24(svn r26375) -Fix [FS#5929]: Station sizes > 8 were always allowed. (adf88)frosch
2013-11-24(svn r26088) -Fix (r26086): Windows compilationrubidium
2013-11-24(svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for ↵rubidium
dropdowns
2013-11-12(svn r25972) -Fix [FS#5665]: rail laying sounds of others could be heard in ↵rubidium
multiplayer (adf88)
2013-10-28(svn r25929) -Fix [FS#5733]: Position signal sprites size-aware in the ↵frosch
signal GUI, that is: Center sprites horizontally, and align the vertical reference point at some baseline which centers the tallest sprite.
2013-10-28(svn r25928) -Fix [FS#5733]: Reserve enough space for two digits of signal ↵frosch
density. (adf88)
2013-10-28(svn r25927) -Fix [FS#5733]: Consider size of signal sprites for sizing the ↵frosch
signal GUI. (based on patch by adf88)
2013-10-12(svn r25854) -Change: Display the cost to upgrade a bridge at the end of ↵zuu
bridge that was clicked and not the other end, which could be outside of the screen in some cases (cirdan, LordAro)
2013-06-30(svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of ↵frosch
rows and columns from the resize step size.
2013-06-30(svn r25535) -Fix [FS#5584]: Initialise scrollbars before FinishInitNested, ↵frosch
so their capacity is set via OnResize.
2013-06-30(svn r25532) -Fix: Do not make the minimal size of matrix or panel widgets ↵frosch
depend on their number of rows, since that changes when resizing the window.
2013-06-30(svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX ↵frosch
widgets.
2013-06-25(svn r25464) -Fix: Hide default size button in non-newstation rail-station ↵frosch
picker since it is not resizeable anyway.
2013-06-15(svn r25414) -Codechange: Move handling of global hotkeys to HotkeyList.frosch
2013-06-15(svn r25412) -Codechange: Make use of Window::OnHotkeyfrosch
2013-06-15(svn r25410) -Codechange: Put all hotkeys of a window into a static ↵frosch
HotkeyList member.
2013-06-15(svn r25408) -Codechange: Simplify hotkeys by removing unused stuff.frosch