Change: Use CenterBounds function in more places.
CenterBounds may have a 1 pixel difference so the result is not exactly the same.
This commit is contained in:
@@ -169,7 +169,7 @@ public:
|
||||
if (widget >= WID_BT_TYPE_BUTTON_FIRST) {
|
||||
const int index = widget - WID_BT_TYPE_BUTTON_FIRST;
|
||||
/* Trees "grow" in the centre on the bottom line of the buttons */
|
||||
DrawSprite(tree_sprites[index].sprite, tree_sprites[index].pal, (r.left + r.right) / 2 + WD_FRAMERECT_LEFT, r.bottom - ScaleGUITrad(BUTTON_BOTTOM_OFFSET));
|
||||
DrawSprite(tree_sprites[index].sprite, tree_sprites[index].pal, CenterBounds(r.left, r.right, 0) + WD_FRAMERECT_LEFT, r.bottom - ScaleGUITrad(BUTTON_BOTTOM_OFFSET));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user