PeterN
f814c86389
Codechange: Reorganise hotkey initialisation. ( #10951 )
...
Hotkeys are now initialized inline, and use std::vector instead of
separate static C-arrays and std::string instead of char *. The list end
marker is no longer required.
1 year ago
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.
1 year ago
Peter Nelson
0513a6ccb0
Change: Use separate names for default stations/roadstops.
1 year ago
PeterN
882f06bf14
Fix: Support more than 256 stations/waypoints/roadstops per class. ( #10793 )
...
It was already possible to define more than 256 per class, but not possible
to use them as the index used in GUI and passed through commands was limited
to a byte.
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
0880616851
Codechange: Remove various STRING strings.
1 year ago
Tyler Trahan
ba3de0383a
Codechange: Pass more std::string to StringFilter::AddLine() ( #10743 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
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.
1 year ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
1 year ago
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
1 year 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
Peter Nelson
1f1378c129
Change: Align picker previews to button centre.
2 years ago
Peter Nelson
ab55d3e1fa
Change: Rearrange layouts of station/depot picker windows.
2 years ago
Tyler Trahan
db98cedb7e
Fix #9883 : Show cost/income float over end tile of rail or road construction
2 years ago
Peter Nelson
af6c4d50ce
Change: Tidy up coverage area label widget layout.
...
Label is now centered properly and uses standard spacing.
2 years ago
Peter Nelson
8626090b24
Codechange: Draw station acceptance text in its own widget.
2 years ago
Michael Lutz
8d54f76539
Fix #9837 , 46bd2f1c: Road build with wrong half-tile ends.
2 years ago
Michael Lutz
8503854655
Codechange: Pass unpacked command arguments to command callbacks (except Script).
3 years ago
Michael Lutz
46bd2f1ced
Codechange: Un-bitstuff remaining transport infrastructure commands.
3 years ago
Michael Lutz
6fe445e6c0
Codechange: Un-bitstuff station/depot/waypoint commands.
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
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.
3 years ago
Michael Lutz
996b16de70
Codechange: Use lambdas instead of CommandContainer to manage station picker commands.
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
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
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
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
3 years ago
Peter Nelson
de81afdf4b
Cleanup: Replace FOR_ALL_SORTED_ROADTYPES macro with range iterator.
3 years ago
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
3 years ago
Patric Stout
7ba0fa4bf0
Fix af22a4f2: scenario editor doesn't have build station/depot/etc ( #8529 )
3 years ago
Patric Stout
af22a4f2cd
Add: show in the tooltip of disabled toolbar buttons why they are disabled
3 years ago
Patric Stout
85a49a0d36
Change: always allow to click on the toolbar icons for road/rail/dock/airport
...
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.
3 years ago
Łukasz Hryniuk
3effad0bea
Fix: Properly invalidate mouse-over station coverage highlight ( #8263 )
4 years ago
Yexo
587d8e716b
Fix #8155 : Roadtype speed limit in toolbar dropdown in scenario editor was doubled
4 years ago
stormcone
2514f43909
Fix #8055 , c02ef3e: Crash when roadtype availability changed with the road toolbar open ( #8058 )
4 years ago
glx
0b5e0522b6
Fix #8043 , c02ef3e4: Incorrect handling of global road/tram hotkeys
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
stormcone
1e5029563c
Fix #7635 : Game crash on exit scenario editor.
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
5 years ago
peter1138
c02ef3e456
Feature: Add NotRoadTypes (NRT)
5 years ago
PeterN
14dc8dd619
Fix 81d335b: Don't check state of widget not present in scenario editor. ( #7551 )
5 years ago
peter1138
81f0f97406
Feature: Add existing station coverage area display when placing new station parts.
5 years ago