Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
2023-05-22 20:43:40 +01:00
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
2023-05-18 12:18:30 +01:00
Peter Nelson
83f2ad500e
Codechange: stdarg.h include not needed as cstdarg is included.
2023-05-17 10:14:41 +01:00
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
2023-05-14 23:31:03 +02:00
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.
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
Peter Nelson
e18f688db5
Codechange: Remove various COMMA strings.
2023-05-05 07:07:54 +01:00
Rubidium
630d3bc053
Codechange: use fmt::format instead of printf for the NewGRF profiler
2023-04-26 18:46:17 +02:00
Rubidium
3105d0b09e
Codechange: replace text-buf printf with fmt::format
2023-04-26 18:46:17 +02:00
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere ( #10720 )
2023-04-26 12:56:14 +01:00
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Tyler Trahan
0bf6f82305
Cleanup: Don't mix switches and early returns in widget selection
2023-03-25 18:03:16 -04:00
Jonathan G Rennison
87e4258fe3
Allow selecting individual ship parts in refit window
...
Add callback to name ship parts in refit window
2023-03-15 19:44:26 +00:00
Jonathan G Rennison
211fdd62b2
Initial support for multi-part (pseudo-articulated) ships
2023-03-15 19:44:26 +00:00
Jonathan G Rennison
ae99f667b0
NewGRF: Add generic town callback to set town zone radii
2023-03-11 22:23:40 +00:00
Jonathan G Rennison
4555724da4
Add CBID_VEHICLE_NAME to GetNewGRFCallbackName
2023-03-11 01:36:50 +00:00
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2023-02-26 21:28:30 +01:00
Jonathan G Rennison
483e3172af
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/strong_typedef_type.hpp
# src/gfx.cpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/map_func.h
# src/newgrf_debug_gui.cpp
# src/order_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_gui.cpp
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/tile_type.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
2023-02-10 17:19:35 +00:00
Jonathan G Rennison
9006a47104
Debug: Fix wrong drawing position of extension variables in debug window
2023-02-04 11:13:13 +00:00
Rubidium
f001e84e5e
Codechange: use RAII to automatically restore _cur_dpi after use
2023-01-28 20:33:02 +01:00
Jonathan G Rennison
3435e74c0c
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release.yml
# CMakeLists.txt
# os/macosx/Info.plist.in
# src/fileio.cpp
# src/landscape.cpp
# src/league_cmd.h
# src/saveload/ai_sl.cpp
# src/saveload/game_sl.cpp
# src/saveload/league_sl.cpp
# src/saveload/saveload.cpp
2022-12-17 23:19:23 +00:00
Peter Nelson
5eb7e1d3ab
Fix: Improve sprite aligner list size and alignment.
2022-12-17 15:38:28 +00:00
Peter Nelson
8adc47858d
Change: Set minimal size on aligner buttons.
2022-12-17 15:38:28 +00:00
Peter Nelson
33eb9688cf
Add: Sprite centre and crosshair toggles on sprite aligner.
2022-12-17 15:38:28 +00:00
Jonathan G Rennison
12b20376b3
Add new landscape flag to enable drawing rocks covered by snow
2022-12-12 23:06:07 +00:00
Jonathan G Rennison
2430a5113e
Debug: Add GRF debug window support for new landscape rocks
2022-12-12 19:15:19 +00:00
Jonathan G Rennison
6d4474b84e
Merge tag '13.0-beta2' into jgrpp
...
# Conflicts:
# src/cheat_gui.cpp
# src/company_gui.cpp
# src/console_gui.cpp
# src/depot_gui.cpp
# src/error_gui.cpp
# src/gfx.cpp
# src/graph_gui.cpp
# src/group_gui.cpp
# src/lang/english.txt
# src/lang/korean.txt
# src/lang/polish.txt
# src/misc_gui.cpp
# src/network/network_content_gui.h
# src/newgrf_debug_gui.cpp
# src/order_gui.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/station_gui.cpp
# src/subsidy_gui.cpp
# src/table/settings/gui_settings.ini
# src/timetable_gui.cpp
# src/town_gui.cpp
# src/train_cmd.cpp
# src/vehicle_gui.cpp
# src/viewport.cpp
# src/water_cmd.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
2022-12-04 20:43:11 +00:00
Jonathan G Rennison
02e19521bc
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/build_vehicle_gui.cpp
# src/cheat_gui.cpp
# src/company_gui.cpp
# src/error_gui.cpp
# src/fios_gui.cpp
# src/gfx_func.h
# src/graph_gui.cpp
# src/group_gui.cpp
# src/misc_gui.cpp
# src/newgrf_debug_gui.cpp
# src/order_gui.cpp
# src/road_gui.cpp
# src/roadveh_gui.cpp
# src/settings_gui.cpp
# src/ship_gui.cpp
# src/station_gui.cpp
# src/statusbar_gui.cpp
# src/subsidy_gui.cpp
# src/timetable_gui.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/vehicle_gui.cpp
# src/widget.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
2022-12-04 13:53:44 +00:00
Jonathan G Rennison
5bbf1f5375
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/geometry_type.hpp
# src/error_gui.cpp
# src/rail_gui.cpp
# src/tree_gui.cpp
# src/vehicle_gui.cpp
# src/widgets/dropdown.cpp
2022-12-03 23:40:37 +00:00
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.
2022-11-23 21:01:09 +00:00
Peter Nelson
f5f035a22b
Codechange: Make use of Rect Width/Height helpers.
2022-11-12 18:28:39 +00:00
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.
2022-11-12 18:28:39 +00:00
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2022-11-12 18:28:39 +00:00
Peter Nelson
b6ed595176
Codechange: Prefer suggested widget padding.
2022-11-12 18:28:39 +00:00
Peter Nelson
fea7247072
Change: Use standard 'frametext' padding for settings window.
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
Jonathan G Rennison
2a806cda21
Debug: Allow highlighting multiple registers
2022-10-05 21:10:49 +01:00
Jonathan G Rennison
4e5e85e7aa
Debug: Allow inspecting industry specs before industry is built
...
Add debug box to industry chains window
2022-08-10 21:35:33 +01:00
Jonathan G Rennison
9ed5b6e65c
Debug: Change sprite group indentation handling
2022-08-09 21:53:43 +01:00
Jonathan G Rennison
dbc55274e2
Debug: Show callback ID names in sprite dump
2022-07-31 19:28:35 +01:00
Jonathan G Rennison
b5d0c1d493
Debug: Show signalled tunnel/bridge info in debug window
2022-06-22 17:57:20 +01:00
Jonathan G Rennison
4d04a757cc
Debug: Add new signals support to GRF debug window
2022-06-15 21:36:55 +01:00
Jonathan G Rennison
45798fa533
Debug: Add scroll to sprite number to debug window
2022-06-08 01:57:10 +01:00
Jonathan G Rennison
86324e0fda
Debug: Add mode to sprite dump window to show unoptimised
2022-06-07 18:54:42 +01:00
Jonathan G Rennison
22e10462dc
Debug: Redraw debug window content if line change moves scroll position
2022-06-07 18:32:46 +01:00
Jonathan G Rennison
a818157c57
Debug: Add button to duplicate debug window
2022-06-07 17:23:10 +01:00
Jonathan G Rennison
6825ea5e79
Debug: Show name of root sprite group shown in vehicle debug window
2022-06-06 01:33:27 +01:00
Jonathan G Rennison
cf640cc0cf
Debug: Add sprite group collapsing to sprite group dump window
2022-06-04 21:08:35 +01:00
Jonathan G Rennison
c238bd5012
Debug: Add temp store highlighting to sprite group dump window
...
Add tooltip
2022-06-02 20:07:18 +01:00
Jonathan G Rennison
564d7e5029
Debug: Allow clicking to highlight group in sprite group dump window
2022-06-01 21:31:05 +01:00