@@ -2282,6 +2282,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
22822282 float loadoutCost = 0 ;
22832283
22842284 const int maxBitmapWidth = 130 ;
2285+ const int margin = 2 ;
22852286
22862287 int bitmapHeight = 0 ;
22872288 int bitmapWidth = 0 ;
@@ -2291,7 +2292,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
22912292 for (const SceneObject* sceneObject: *loadout.GetCargoList ()) {
22922293 if (dynamic_cast <const Actor*>(sceneObject)) {
22932294 // start a new row
2294- bitmapHeight += rowHeight;
2295+ bitmapHeight += rowHeight + margin ;
22952296 bitmapWidth = std::max (bitmapWidth, rowWidth);
22962297 rowHeight = 0 ;
22972298 rowWidth = 0 ;
@@ -2302,7 +2303,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
23022303 }
23032304
23042305 rowHeight = std::max (rowHeight, sceneObject->GetGraphicalIcon ()->h );
2305- rowWidth += sceneObject->GetGraphicalIcon ()->w ;
2306+ rowWidth += sceneObject->GetGraphicalIcon ()->w + margin ;
23062307 }
23072308
23082309 // and once more for the last row
@@ -2320,7 +2321,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
23202321 for (const SceneObject* sceneObject: *loadout.GetCargoList ()) {
23212322 if (dynamic_cast <const Actor*>(sceneObject)) {
23222323 // start a new row
2323- heightOffset += rowHeight;
2324+ heightOffset += rowHeight + margin ;
23242325 rowHeight = 0 ;
23252326 widthOffset = 0 ;
23262327 }
@@ -2336,7 +2337,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
23362337 int yOffset = (rowHeight - sceneObject->GetGraphicalIcon ()->h ) / 2 ;
23372338
23382339 draw_sprite (pItemBitmap->GetBitmap (), sceneObject->GetGraphicalIcon (), widthOffset, heightOffset + yOffset);
2339- widthOffset += sceneObject->GetGraphicalIcon ()->w ;
2340+ widthOffset += sceneObject->GetGraphicalIcon ()->w + margin ;
23402341 }
23412342
23422343 for (const SceneObject* sceneObject: *loadout.GetCargoList ()) {
0 commit comments