# HG changeset patch # User koda # Date 1283459844 -7200 # Node ID 7af568bc071066b1cbe972a48f1eb0334cf05050 # Parent ce18fd3ff02d59f31e94e27d8a3909c954f274c2 discrimination between ai and humans diff -r ce18fd3ff02d -r 7af568bc0710 project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.xib --- a/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.xib Thu Sep 02 21:49:36 2010 +0400 +++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.xib Thu Sep 02 22:37:24 2010 +0200 @@ -197,7 +197,7 @@ <object class="IBUIImageView" id="713859408"> <reference key="NSNextResponder" ref="766721923"/> <int key="NSvFlags">292</int> - <string key="NSFrame">{{393, 399}, {240, 128}}</string> + <string key="NSFrame">{{393, 389}, {240, 166}}</string> <reference key="NSSuperview" ref="766721923"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIUserInteractionEnabled">NO</bool> @@ -207,7 +207,7 @@ <object class="IBUILabel" id="896727228"> <reference key="NSNextResponder" ref="766721923"/> <int key="NSvFlags">292</int> - <string key="NSFrame">{{403, 417}, {109, 22}}</string> + <string key="NSFrame">{{401, 410}, {109, 22}}</string> <reference key="NSSuperview" ref="766721923"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClipsSubviews">YES</bool> @@ -224,14 +224,14 @@ <object class="IBUILabel" id="704238452"> <reference key="NSNextResponder" ref="766721923"/> <int key="NSvFlags">292</int> - <string key="NSFrame">{{400, 427}, {232, 100}}</string> + <string key="NSFrame">{{400, 429}, {232, 120}}</string> <reference key="NSSuperview" ref="766721923"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClipsSubviews">YES</bool> <int key="IBUIContentMode">7</int> <bool key="IBUIUserInteractionEnabled">NO</bool> <string key="targetRuntimeIdentifier">IBIPadFramework</string> - <string key="IBUIText">Select which teams are playing! You can set the number of hogs and have multiple teams play together.</string> + <string key="IBUIText">Select which teams are playing! Add hogs by tapping on them and set their color to figure friend and foe teams out. AI teams will appear with a small robot badge next their name.</string> <reference key="IBUIFont" ref="818038162"/> <reference key="IBUITextColor" ref="283637272"/> <nil key="IBUIHighlightedColor"/> @@ -790,7 +790,7 @@ <string>HelpPageViewController</string> <string>UIResponder</string> <string>UIControl</string> - <string>{{273, 67}, {1024, 768}}</string> + <string>{{273, 106}, {1024, 768}}</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> diff -r ce18fd3ff02d -r 7af568bc0710 project_files/HedgewarsMobile/Classes/TeamConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Thu Sep 02 21:49:36 2010 +0400 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Thu Sep 02 22:37:24 2010 +0200 @@ -99,13 +99,16 @@ [cell addSubview:numberButton]; [numberButton release]; - SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+7, 5, 36, 36)]; + SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+6, 5, 36, 36)]; squareButton.tag = SQUAREBUTTON_TAG; [cell addSubview:squareButton]; [squareButton release]; - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+7+36+7, 10, 250, 25)]; + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+6+36, 10, 103, 25)]; label.textAlignment = UITextAlignmentLeft; + label.minimumFontSize = 11; + label.adjustsFontSizeToFitWidth = YES; + label.baselineAdjustment = UIBaselineAdjustmentAlignCenters; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; label.textColor = UICOLOR_HW_YELLOW_TEXT; @@ -126,12 +129,26 @@ SquareButtonView *squareButton = (SquareButtonView *)[cell viewWithTag:SQUAREBUTTON_TAG]; [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]]; squareButton.ownerDictionary = selectedRow; + + NSString *teamPath = [NSString stringWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[selectedRow objectForKey:@"team"]]; + NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0]; + if ([[firstHog objectForKey:@"level"] intValue]> 0) { + NSString *filePath = [NSString stringWithFormat:@"%@/cyborg.png",HATS_DIRECTORY()]; + UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath andCutAt:CGRectMake(0, 2, 32, 32)]; + UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite]; + [sprite release]; + + cell.accessoryView = spriteView; + [spriteView release]; + } else + cell.accessoryView = nil; } else { cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1]; if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension]; + cell.accessoryView = nil; } if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {