132 |
132 |
133 -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { |
133 -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { |
134 NSString *sectionTitle = nil; |
134 NSString *sectionTitle = nil; |
135 switch (section) { |
135 switch (section) { |
136 case 0: |
136 case 0: |
137 sectionTitle = NSLocalizedString(@"Main Configuration", @""); |
137 sectionTitle = NSLocalizedString(@"Main Configuration", @"from the settings table"); |
138 break; |
138 break; |
139 case 1: |
139 case 1: |
140 sectionTitle = NSLocalizedString(@"Audio Preferences", @""); |
140 sectionTitle = NSLocalizedString(@"Audio Preferences", @"from the settings table"); |
141 break; |
141 break; |
142 case 2: |
142 case 2: |
143 sectionTitle = NSLocalizedString(@"Other Settings", @""); |
143 sectionTitle = NSLocalizedString(@"Other Settings", @"from the settings table"); |
144 break; |
144 break; |
145 default: |
145 default: |
146 DLog(@"Nope"); |
146 DLog(@"Nope"); |
147 break; |
147 break; |
148 } |
148 } |
171 editableCell.textField.textColor = [UIColor blackColor]; |
171 editableCell.textField.textColor = [UIColor blackColor]; |
172 } |
172 } |
173 |
173 |
174 if (row == 0) { |
174 if (row == 0) { |
175 editableCell.titleLabel.text = NSLocalizedString(@"Nickname","from the settings table"); |
175 editableCell.titleLabel.text = NSLocalizedString(@"Nickname","from the settings table"); |
176 editableCell.textField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@""); |
176 editableCell.textField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@"from the settings table"); |
177 editableCell.textField.text = [settings objectForKey:@"username"]; |
177 editableCell.textField.text = [settings objectForKey:@"username"]; |
178 editableCell.textField.secureTextEntry = NO; |
178 editableCell.textField.secureTextEntry = NO; |
179 editableCell.tag = 40; |
179 editableCell.tag = 40; |
180 } else { |
180 } else { |
181 editableCell.titleLabel.text = NSLocalizedString(@"Password","from the settings table"); |
181 editableCell.titleLabel.text = NSLocalizedString(@"Password","from the settings table"); |
182 editableCell.textField.placeholder = NSLocalizedString(@"Insert your password",@""); |
182 editableCell.textField.placeholder = NSLocalizedString(@"Insert your password",@"from the settings table"); |
183 editableCell.textField.text = [settings objectForKey:@"password"]; |
183 editableCell.textField.text = [settings objectForKey:@"password"]; |
184 editableCell.textField.secureTextEntry = YES; |
184 editableCell.textField.secureTextEntry = YES; |
185 editableCell.tag = 50; |
185 editableCell.tag = 50; |
186 } |
186 } |
187 |
187 |
198 [theSwitch release]; |
198 [theSwitch release]; |
199 } |
199 } |
200 |
200 |
201 switchContent = (UISwitch *)cell.accessoryView; |
201 switchContent = (UISwitch *)cell.accessoryView; |
202 if (row == 0) { |
202 if (row == 0) { |
203 cell.textLabel.text = NSLocalizedString(@"Sound", @""); |
203 cell.textLabel.text = NSLocalizedString(@"Sound", @"from the settings table"); |
204 switchContent.on = [[settings objectForKey:@"sound"] boolValue]; |
204 switchContent.on = [[settings objectForKey:@"sound"] boolValue]; |
205 switchContent.tag = 10; |
205 switchContent.tag = 10; |
206 } else { |
206 } else { |
207 cell.textLabel.text = NSLocalizedString(@"Music", @""); |
207 cell.textLabel.text = NSLocalizedString(@"Music", @"from the settings table"); |
208 switchContent.on = [[settings objectForKey:@"music"] boolValue]; |
208 switchContent.on = [[settings objectForKey:@"music"] boolValue]; |
209 switchContent.tag = 20; |
209 switchContent.tag = 20; |
210 } |
210 } |
211 break; |
211 break; |
212 case 2: |
212 case 2: |
221 |
221 |
222 switchContent = (UISwitch *)cell.accessoryView; |
222 switchContent = (UISwitch *)cell.accessoryView; |
223 cell.detailTextLabel.adjustsFontSizeToFitWidth = YES; |
223 cell.detailTextLabel.adjustsFontSizeToFitWidth = YES; |
224 switch (row) { |
224 switch (row) { |
225 case 0: |
225 case 0: |
226 cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @""); |
226 cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @"from the settings table"); |
227 cell.detailTextLabel.text = NSLocalizedString(@"Damage popups will notify you on every single hit", @""); |
227 cell.detailTextLabel.text = NSLocalizedString(@"Damage popups will notify you on every single hit", @"from the settings table"); |
228 switchContent.on = [[settings objectForKey:@"alternate"] boolValue]; |
228 switchContent.on = [[settings objectForKey:@"alternate"] boolValue]; |
229 switchContent.tag = 30; |
229 switchContent.tag = 30; |
230 break; |
230 break; |
231 case 1: |
231 case 1: |
232 cell.textLabel.text = NSLocalizedString(@"Sync Schemes and Weapons", @""); |
232 cell.textLabel.text = NSLocalizedString(@"Sync Schemes and Weapons", @""); |
233 cell.detailTextLabel.text = NSLocalizedString(@"Choosing a Scheme will select its associated Weapon", @""); |
233 cell.detailTextLabel.text = NSLocalizedString(@"Choosing a Scheme will select its associated Weapon", @"from the settings table"); |
234 switchContent.on = [[settings objectForKey:@"sync_ws"] boolValue]; |
234 switchContent.on = [[settings objectForKey:@"sync_ws"] boolValue]; |
235 switchContent.tag = 90; |
235 switchContent.tag = 90; |
236 break; |
236 break; |
237 case 2: |
237 case 2: |
238 cell.textLabel.text = NSLocalizedString(@"Classic Ammo Menu", @""); |
238 cell.textLabel.text = NSLocalizedString(@"Classic Ammo Menu", @""); |
239 cell.detailTextLabel.text = NSLocalizedString(@"Select which style of ammo menu you prefer",@""); |
239 cell.detailTextLabel.text = NSLocalizedString(@"Select which style of ammo menu you prefer",@"from the settings table"); |
240 switchContent.on = [[settings objectForKey:@"classic_menu"] boolValue]; |
240 switchContent.on = [[settings objectForKey:@"classic_menu"] boolValue]; |
241 switchContent.tag = 60; |
241 switchContent.tag = 60; |
242 break; |
242 break; |
243 default: |
243 default: |
244 DLog(@"Nope"); |
244 DLog(@"Nope"); |