@@ -2282,6 +2282,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
2282
2282
float loadoutCost = 0 ;
2283
2283
2284
2284
const int maxBitmapWidth = 130 ;
2285
+ const int margin = 2 ;
2285
2286
2286
2287
int bitmapHeight = 0 ;
2287
2288
int bitmapWidth = 0 ;
@@ -2291,7 +2292,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
2291
2292
for (const SceneObject* sceneObject: *loadout.GetCargoList ()) {
2292
2293
if (dynamic_cast <const Actor*>(sceneObject)) {
2293
2294
// start a new row
2294
- bitmapHeight += rowHeight;
2295
+ bitmapHeight += rowHeight + margin ;
2295
2296
bitmapWidth = std::max (bitmapWidth, rowWidth);
2296
2297
rowHeight = 0 ;
2297
2298
rowWidth = 0 ;
@@ -2302,7 +2303,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
2302
2303
}
2303
2304
2304
2305
rowHeight = std::max (rowHeight, sceneObject->GetGraphicalIcon ()->h );
2305
- rowWidth += sceneObject->GetGraphicalIcon ()->w ;
2306
+ rowWidth += sceneObject->GetGraphicalIcon ()->w + margin ;
2306
2307
}
2307
2308
2308
2309
// and once more for the last row
@@ -2320,7 +2321,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
2320
2321
for (const SceneObject* sceneObject: *loadout.GetCargoList ()) {
2321
2322
if (dynamic_cast <const Actor*>(sceneObject)) {
2322
2323
// start a new row
2323
- heightOffset += rowHeight;
2324
+ heightOffset += rowHeight + margin ;
2324
2325
rowHeight = 0 ;
2325
2326
widthOffset = 0 ;
2326
2327
}
@@ -2336,7 +2337,7 @@ void BuyMenuGUI::AddPresetsToItemList() {
2336
2337
int yOffset = (rowHeight - sceneObject->GetGraphicalIcon ()->h ) / 2 ;
2337
2338
2338
2339
draw_sprite (pItemBitmap->GetBitmap (), sceneObject->GetGraphicalIcon (), widthOffset, heightOffset + yOffset);
2339
- widthOffset += sceneObject->GetGraphicalIcon ()->w ;
2340
+ widthOffset += sceneObject->GetGraphicalIcon ()->w + margin ;
2340
2341
}
2341
2342
2342
2343
for (const SceneObject* sceneObject: *loadout.GetCargoList ()) {
0 commit comments