Cocoa Port: Add two new Cheat Manager actions, "Enable All Cheats" and "Disable All Cheats", which do exactly as their descriptions would suggest.

This commit is contained in:
rogerman 2023-08-02 13:50:41 -07:00
parent 41e3401765
commit 402e9f0a31
3 changed files with 267 additions and 916 deletions

View File

@ -98,7 +98,11 @@
- (IBAction) addToList:(id)sender;
- (IBAction) removeFromList:(id)sender;
- (IBAction) enableAllInList:(id)sender;
- (IBAction) disableAllInList:(id)sender;
- (IBAction) removeAllFromList:(id)sender;
- (IBAction) setInternalCheatValue:(id)sender;
- (IBAction) applyConfiguration:(id)sender;
- (IBAction) selectCheatType:(id)sender;

View File

@ -197,6 +197,38 @@
}
}
- (IBAction) enableAllInList:(id)sender
{
NSArray *cheatListArray = [cheatListController content];
if (cheatListArray == nil)
{
return;
}
for (CocoaDSCheatItem *cheatItem in cheatListArray)
{
[cheatItem setEnabled:YES];
}
[[self cdsCheats] save];
}
- (IBAction) disableAllInList:(id)sender
{
NSArray *cheatListArray = [cheatListController content];
if (cheatListArray == nil)
{
return;
}
for (CocoaDSCheatItem *cheatItem in cheatListArray)
{
[cheatItem setEnabled:NO];
}
[[self cdsCheats] save];
}
- (IBAction) removeAllFromList:(id)sender
{
CocoaDSCheatManager *cheatManager = [self cdsCheats];