project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
branchios-revival
changeset 11272 bb6c553162c5
parent 11238 e529b597f9d1
child 11273 68a0df07382b
equal deleted inserted replaced
11262:6e1aa1144a2b 11272:bb6c553162c5
    18 
    18 
    19 
    19 
    20 #import "SchemeWeaponConfigViewController.h"
    20 #import "SchemeWeaponConfigViewController.h"
    21 #import <QuartzCore/QuartzCore.h>
    21 #import <QuartzCore/QuartzCore.h>
    22 
    22 
       
    23 #define DISABLED_GAME_STYLES @[@""]
    23 
    24 
    24 #define LABEL_TAG 57423
    25 #define LABEL_TAG 57423
    25 #define TABLE_TAG 45657
    26 #define TABLE_TAG 45657
    26 
    27 
    27 @implementation SchemeWeaponConfigViewController
    28 @implementation SchemeWeaponConfigViewController
    71 }
    72 }
    72 
    73 
    73 -(NSArray *)listOfScripts {
    74 -(NSArray *)listOfScripts {
    74     if (listOfScripts == nil)
    75     if (listOfScripts == nil)
    75         self.listOfScripts = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCRIPTS_DIRECTORY() error:NULL]
    76         self.listOfScripts = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCRIPTS_DIRECTORY() error:NULL]
    76                               filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF ENDSWITH '.lua'"]];
    77                               filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF ENDSWITH '.lua' AND NOT (SELF IN %@)", DISABLED_GAME_STYLES]];
    77     return listOfScripts;
    78     return listOfScripts;
    78 }
    79 }
    79 
    80 
    80 -(UISegmentedControl *)topControl {
    81 -(UISegmentedControl *)topControl {
    81     if (topControl == nil) {
    82     if (topControl == nil) {