project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m
changeset 5370 a3f87be7b09a
parent 5224 6e8fbbfb0de5
child 5451 e359a79e3d08
equal deleted inserted replaced
5368:a66d5141a3ba 5370:a3f87be7b09a
    60             // setting this off will turn off also the switch below (music)
    60             // setting this off will turn off also the switch below (music)
    61             [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"sound"];
    61             [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"sound"];
    62             [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
    62             [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
    63             theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView;
    63             theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView;
    64             [theOtherSwitch setOn:NO animated:YES];
    64             [theOtherSwitch setOn:NO animated:YES];
       
    65 
       
    66             if (theOtherSwitch.on)
       
    67                 [HedgewarsAppDelegate pauseBackgroundMusic];
    65             break;
    68             break;
    66         case 20:    //musicSwitch
    69         case 20:    //musicSwitch
    67             // if switch above (sound) is off, never turn on
    70             // if switch above (sound) is off, never turn on
    68             if (NO == [[settings objectForKey:@"sound"] boolValue]) {
    71             if (NO == [[settings objectForKey:@"sound"] boolValue]) {
    69                 [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
    72                 [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];