diff -r 1429c303858d -r dd47efbdec46 project_files/HedgewarsMobile/Classes/UIImageExtra.m --- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m Sun Sep 26 16:28:04 2010 -0400 +++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m Sun Sep 26 23:48:03 2010 +0200 @@ -220,4 +220,19 @@ return result; } ++(UIImage *)whiteImage:(CGSize) ofSize { + // white rounded rectangle as background image for previewButton + UIGraphicsBeginImageContext(ofSize); + CGContextRef context = UIGraphicsGetCurrentContext(); + UIGraphicsPushContext(context); + + CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); + CGContextFillRect(context,CGRectMake(0,0,ofSize.width,ofSize.height)); + + UIGraphicsPopContext(); + UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return bkgImg; +} + @end