project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m
changeset 5976 306cedbeb213
parent 5208 878e551f0b4a
child 6078 8c0cc07731e5
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Tue Sep 20 23:43:52 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Wed Sep 21 02:05:42 2011 +0200
@@ -165,10 +165,12 @@
             weaponCell.delegate = self;
         }
 
-        int x = ((row*32)/(int)self.ammoStoreImage.size.height)*32;
-        int y = (row*32)%(int)self.ammoStoreImage.size.height;
+        int size = 32 * getScreenScale();
+        int corners = 8 * getScreenScale();
+        int x = ((row*size)/(int)(self.ammoStoreImage.size.height*getScreenScale()))*size;
+        int y = (row*size)%(int)(self.ammoStoreImage.size.height*getScreenScale());
 
-        UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)];
+        UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, size, size)] makeRoundCornersOfSize:CGSizeMake(corners, corners)];
         weaponCell.weaponIcon.image = img;
         weaponCell.weaponName.text = [NSString stringWithUTF8String:HW_getWeaponNameByIndex(row)];
         weaponCell.tag = row;