File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2266,9 +2266,13 @@ void BuyMenuGUI::AddPresetsToItemList() {
2266
2266
continue ; // don't draw anything that would overflow the bitmap
2267
2267
}
2268
2268
2269
- draw_sprite (pItemBitmap->GetBitmap (), sceneObject->GetGraphicalIcon (), widthOffset, heightOffset);
2270
-
2271
2269
rowHeight = std::max (rowHeight, sceneObject->GetGraphicalIcon ()->h );
2270
+
2271
+ // TODO: make a smarter row structure so we can properly centre the icons if the actor isn't the tallest item in the row
2272
+ // Vertically center the icon in the row
2273
+ int yOffset = (rowHeight - sceneObject->GetGraphicalIcon ()->h ) / 2 ;
2274
+
2275
+ draw_sprite (pItemBitmap->GetBitmap (), sceneObject->GetGraphicalIcon (), widthOffset, heightOffset + yOffset);
2272
2276
widthOffset += sceneObject->GetGraphicalIcon ()->w ;
2273
2277
}
2274
2278
You can’t perform that action at this time.
0 commit comments