Fix bad pixel offsets in CPU flag preview
authorWuzzy <Wuzzy2@mail.ru>
Thu, 25 Jul 2019 19:40:40 +0200
changeset 15272 3053d07a7840
parent 15271 a0e425458694
child 15273 bfd185ad03e7
Fix bad pixel offsets in CPU flag preview
QTfrontend/ui/page/pageeditteam.cpp
--- a/QTfrontend/ui/page/pageeditteam.cpp	Thu Jul 25 19:18:48 2019 +0200
+++ b/QTfrontend/ui/page/pageeditteam.cpp	Thu Jul 25 19:40:40 2019 +0200
@@ -169,12 +169,13 @@
     // CPU level flag. Static image, only displayed when computer player is selected
     QImage imgBotlevels = QImage("physfs://Graphics/botlevels.png");
 
-    int botlevelOffsets[5]= { 19, 14, 10, 6, 0 };   
+    int botlevelOffsetsX[5]= { 17, 13, 9, 5, 0 };
+    int botlevelOffsetsY[5]= { 11, 9, 4, 2, 0 };
 
     for(int i=0; i<5; i++) {
         QImage imgCPU = QImage("physfs://Graphics/Flags/cpu.png");
         QPainter painter(&imgCPU);
-        painter.drawImage(botlevelOffsets[i], 0, imgBotlevels, botlevelOffsets[i]);
+        painter.drawImage(botlevelOffsetsX[i], botlevelOffsetsY[i], imgBotlevels, botlevelOffsetsX[i], botlevelOffsetsY[i]);
 
         pixCPU[i] = QPixmap::fromImage(imgCPU);
     }