Commit Graph

95 Commits (199e41c762c52c3fff85e52853ef78b7332c7645)

Author SHA1 Message Date
Patric Stout 199e41c762
Codechange: use default dtor instead of empty (#10826) 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 e18f688db5 Codechange: Remove various COMMA strings. 1 year ago
Rubidium 630d3bc053 Codechange: use fmt::format instead of printf for the NewGRF profiler 1 year ago
Rubidium 3105d0b09e Codechange: replace text-buf printf with fmt::format 1 year ago
Charles Pigott 80bd5ad727
Codechange: Use std::strto* variants everywhere (#10720) 1 year ago
PeterN e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Tyler Trahan 0bf6f82305 Cleanup: Don't mix switches and early returns in widget selection 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 5eb7e1d3ab Fix: Improve sprite aligner list size and alignment. 2 years ago
Peter Nelson 8adc47858d Change: Set minimal size on aligner buttons. 2 years ago
Peter Nelson 33eb9688cf Add: Sprite centre and crosshair toggles on sprite aligner. 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 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson b6ed595176 Codechange: Prefer suggested widget padding. 2 years ago
Peter Nelson fea7247072 Change: Use standard 'frametext' padding for settings window. 2 years ago
Peter Nelson 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Peter Nelson f5f035a22b Codechange: Make use of Rect Width/Height helpers. 2 years ago
Peter Nelson eb4ba1991b Change: Use CenterBounds function in more places.
CenterBounds may have a 1 pixel difference so the result is not exactly
the same.
2 years ago
rubidium42 e588923bff Codechange: add std::string accepting SetDParamStr to ErrorMessageData 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
Rubidium fdc11a9f94 Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality 3 years ago
Peter Nelson af70195e44 Fix: Tidy up sizing of sprite aligner window sprite list. 3 years ago
Patric Stout 853bfc3562 Codechange: replace _realtime_tick with std::chrono for mouse events 3 years ago
Michael Lutz 84636fc2af Codechange: Remove all remaining uses of cpp_offset. 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
dP 3db7cf54fd Fix: sprite preview in sprite aligner is too small with scaled UI 4 years ago
Michael Lutz f2b40f40aa Codechange: Replace SmallPair with std::pair.
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
stormcone 6396ec05fe Fix #7609: In the sprite aligner window the 'Reset relative' button crashes the game.
The 'offs_start_map' is a 'SmallMap', so its own 'Erase' function should be called instead of the underlying vector's 'erase' function.
And fix a "typo". :)
5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson ca2f33c6d0 Codechange: Replaced SmallVector::Erase() with std::vector::erase() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 5 years ago
alberth e9f12d666d (svn r27451) -Feature[FS#6241]: Move sprite 8 positions in sprite aligner with ctrl+click. (based on work by juzza1) 9 years ago
alberth a5843149b5 (svn r27174) -Feature[FS#6236]: Display relative offset changes in the sprite aligner (juzza1). 9 years ago
frosch a4756c477d (svn r27173) -Fix [FS#6237] (r27134): Use the regular clipping functions in the sprite aligner instead of some magic. 9 years ago
frosch a8080b6256 (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). 10 years ago
alberth 107bf32953 (svn r27086) -Codechange: Simplify opening of windows by always returning a valid window pointer. 10 years ago
peter1138 17cd86d762 (svn r26942) -Codechange: Make sprite aligner useful for people making full-zoom graphics. 10 years ago
peter1138 1273ca8e8d (svn r26941) -Codechange: Make NewGRF sprite aligner work with GUI size. 10 years ago
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 10 years ago
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 10 years ago
frosch 0aae2fd606 (svn r25946) -Add: [NewGRF Debuggnig] Inspecting other vehicles in a chain. 11 years ago
frosch b0c2ab4501 (svn r25945) -Codechange: Use member function of NewGRFInspectWindow to resolve FeatureIndex. 11 years ago