preset advanced widget template profile

This commit is contained in:
TrueZhuangjia
2025-04-03 00:13:52 +08:00
committed by TrueZhuanjia
parent a03a50d238
commit f260d75372
6 changed files with 64 additions and 10 deletions
@@ -162,11 +162,18 @@
[self addInnerAnalogSticksToOuterAnalogLayers]; // allows inner and analog sticks to be dragged together around the screen together as one unit which is the expected behavior
self.undoButton.alpha = 0.3; // no changes to undo yet, so fade out the undo button a bit
if ([[profilesManager getAllProfiles] count] == 0) { // if no saved OSC profiles exist yet then create one called 'Default' and associate it with Moonlight's legacy 'Full' OSC layout that's already been laid out on the screen at this point
NSMutableArray* allProfiles = [profilesManager getAllProfiles];
/*
if ([allProfiles count] == 0) { // if no saved OSC profiles exist yet then create one called 'Default' and associate it with Moonlight's legacy 'Full' OSC layout that's already been laid out on the screen at this point
[profilesManager saveProfileWithName:@"Default" andButtonLayers:self.layoutOSC.OSCButtonLayers];
[profilesManager importDefaultTemplates];
}*/
if (![profilesManager profileName:DEFAULT_TEMPLATE_NAME alreadyExistIn:allProfiles]){
[profilesManager importDefaultTemplates];
}
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(setControllerCALayerSliderValues:)
name:@"LegacyOscCALayerSelectedNotification"