project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
branchios-develop
changeset 13166 ba5c794adae3
parent 12872 00215a7ec5f5
equal deleted inserted replaced
13164:eefd6d066768 13166:ba5c794adae3
    33     return rotationManager(interfaceOrientation);
    33     return rotationManager(interfaceOrientation);
    34 }
    34 }
    35 
    35 
    36 #pragma mark -
    36 #pragma mark -
    37 #pragma mark custom setters/getters
    37 #pragma mark custom setters/getters
    38 -(NSString *)selectedScheme {
    38 - (NSString *)selectedScheme {
    39     if (selectedScheme == nil)
    39     if (selectedScheme == nil)
    40         self.selectedScheme = @"Default.plist";
    40         self.selectedScheme = @"Default.plist";
    41     return selectedScheme;
    41     return selectedScheme;
    42 }
    42 }
    43 
    43 
    44 -(NSString *)selectedWeapon {
    44 - (NSString *)selectedWeapon {
    45     if (selectedWeapon == nil)
    45     if (selectedWeapon == nil)
    46         self.selectedWeapon = @"Default.plist";
    46         self.selectedWeapon = @"Default.plist";
    47     return selectedWeapon;
    47     return selectedWeapon;
    48 }
    48 }
    49 
    49 
    50 -(NSString *)selectedScript {
    50 - (NSString *)selectedScript {
    51     if (selectedScript == nil)
    51     if (selectedScript == nil)
    52         self.selectedScript = @"";
    52         self.selectedScript = @"";
    53     return selectedScript;
    53     return selectedScript;
    54 }
    54 }
    55 
    55 
    56 -(NSString *)scriptCommand {
    56 - (NSString *)scriptCommand {
    57     if (scriptCommand == nil)
    57     if (scriptCommand == nil)
    58         self.scriptCommand = @"";
    58         self.scriptCommand = @"";
    59     return scriptCommand;
    59     return scriptCommand;
    60 }
    60 }
    61 
    61 
   228     cell.textLabel.adjustsFontSizeToFitWidth = YES;
   228     cell.textLabel.adjustsFontSizeToFitWidth = YES;
   229     cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
   229     cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
   230     return cell;
   230     return cell;
   231 }
   231 }
   232 
   232 
   233 -(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section {
   233 - (CGFloat)tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section {
   234     return IS_IPAD() ? 0 : 50;
   234     return IS_IPAD() ? 0 : 50;
   235 }
   235 }
   236 
   236 
   237 -(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section {
   237 -(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section {
   238     if (IS_IPAD())
   238     if (IS_IPAD())
   244     [self.topControl addTarget:aTableView action:@selector(reloadData) forControlEvents:UIControlEventValueChanged];
   244     [self.topControl addTarget:aTableView action:@selector(reloadData) forControlEvents:UIControlEventValueChanged];
   245     [theView addSubview:self.topControl];
   245     [theView addSubview:self.topControl];
   246     return theView;
   246     return theView;
   247 }
   247 }
   248 
   248 
   249 -(CGFloat) tableView:(UITableView *)aTableView heightForFooterInSection:(NSInteger)section {
   249 - (CGFloat)tableView:(UITableView *)aTableView heightForFooterInSection:(NSInteger)section {
   250     return 40;
   250     return 40;
   251 }
   251 }
   252 
   252 
   253 -(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger)section {
   253 -(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger)section {
   254     NSInteger height = 40;
   254     NSInteger height = 40;