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
This commit is contained in:
@@ -37,9 +37,9 @@ void DrawShipImage(const Vehicle *v, int left, int right, int y, VehicleID selec
|
||||
VehicleSpriteSeq seq;
|
||||
v->GetImage(rtl ? DIR_E : DIR_W, image_type, &seq);
|
||||
|
||||
Rect16 rect = seq.GetBounds();
|
||||
Rect rect = ConvertRect<Rect16, Rect>(seq.GetBounds());
|
||||
|
||||
int width = UnScaleGUI(rect.right - rect.left + 1);
|
||||
int width = UnScaleGUI(rect.Width());
|
||||
int x_offs = UnScaleGUI(rect.left);
|
||||
int x = rtl ? right - width - x_offs : left - x_offs;
|
||||
|
||||
@@ -49,7 +49,7 @@ void DrawShipImage(const Vehicle *v, int left, int right, int y, VehicleID selec
|
||||
if (v->index == selection) {
|
||||
x += x_offs;
|
||||
y += UnScaleGUI(rect.top);
|
||||
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(rect.bottom - rect.top + 1) + 1, COLOUR_WHITE, FR_BORDERONLY);
|
||||
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(rect.Height()) + 1, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user