Merge tag '1.11.0-beta2' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release.yml # CMakeLists.txt # src/blitter/32bpp_optimized.cpp # src/debug.cpp # src/gfx.cpp # src/gfx_func.h # src/lang/czech.txt # src/lang/english.txt # src/lang/italian.txt # src/lang/swedish.txt # src/lang/ukrainian.txt # src/network/network_server.cpp # src/os/windows/crashlog_win.cpp # src/os/windows/win32.cpp # src/pathfinder/follow_track.hpp # src/screenshot.cpp # src/settings_type.h # src/spritecache.cpp # src/vehicle_gui.cpp # src/video/sdl2_v.cpp # src/video/video_driver.cpp # src/video/video_driver.hpp # src/video/win32_v.cpp
This commit is contained in:
@@ -4065,7 +4065,7 @@ void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
|
||||
_cursor.sprite_count = 0;
|
||||
int total_width = 0;
|
||||
for (; v != nullptr; v = v->HasArticulatedPart() ? v->GetNextArticulatedPart() : nullptr) {
|
||||
if (total_width >= 2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH) break;
|
||||
if (total_width >= ScaleGUITrad(2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH)) break;
|
||||
|
||||
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
|
||||
VehicleSpriteSeq seq;
|
||||
@@ -4085,7 +4085,7 @@ void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
|
||||
total_width += GetSingleVehicleWidth(v, image_type);
|
||||
}
|
||||
|
||||
int offs = ((int)VEHICLEINFO_FULL_VEHICLE_WIDTH - total_width) / 2;
|
||||
int offs = (ScaleGUITrad(VEHICLEINFO_FULL_VEHICLE_WIDTH) - total_width) / 2;
|
||||
if (rtl) offs = -offs;
|
||||
for (uint i = 0; i < _cursor.sprite_count; ++i) {
|
||||
_cursor.sprite_pos[i].x += offs;
|
||||
|
Reference in New Issue
Block a user