Michael Lutz
8dda387f82
Codechange: Use std::tuple for slope functions with two return values
7 months ago
Rubidium
aa5ba5bd7f
Codechange: allow certain enumeration to be added
...
Otherwise C++20 doesn't like it.
9 months ago
Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
9 months ago
Peter Nelson
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
9 months ago
Peter Nelson
712a4bb40b
Fix: Prevent picker preview sprites from overflowing button bevel.
10 months ago
Peter Nelson
313ee13e5f
Codechange: Add Rect version of FillDrawPixelInfo().
...
This simplifies most callers as they longer have to split out a rect.
10 months ago
Peter Nelson
b216dc493f
Change: Bring dock picker inline with other pickers.
11 months ago
Peter Nelson
d380f2f3a2
Codechange: Simplify layout of depot pickers.
11 months ago
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
11 months ago
Peter Nelson
f379b31e28
Add: data parameter in Window::Close method.
...
This allows passing data when closing a window, e.g. to indicate how it was closed.
12 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Rubidium
8ab0936491
Codechange: use parameter pack/folding instead of va_arg macros for widget states
1 year ago
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
1 year ago
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
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
2 years ago
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2 years ago
Tyler Trahan
0fc7cdb1e4
Change: Allow building canal by area outside editor ( #10173 )
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
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
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
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
123c7f99c3
Codechange: Move command callback declarations to the cmd header files.
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
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
Tyler Trahan
adb9fa3b36
Feature: Press ctrl to build diagonal rivers in Scenario Editor ( #8880 )
4 years ago
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
4 years ago
Patric Stout
7ba0fa4bf0
Fix af22a4f2: scenario editor doesn't have build station/depot/etc ( #8529 )
4 years ago
Patric Stout
af22a4f2cd
Add: show in the tooltip of disabled toolbar buttons why they are disabled
4 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.
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Łukasz Hryniuk
3effad0bea
Fix: Properly invalidate mouse-over station coverage highlight ( #8263 )
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
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
5 years ago
PeterN
14dc8dd619
Fix 81d335b: Don't check state of widget not present in scenario editor. ( #7551 )
6 years ago
peter1138
81f0f97406
Feature: Add existing station coverage area display when placing new station parts.
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago