preset profile editing

This commit is contained in:
TrueZhuanjia
2025-12-28 20:50:21 +08:00
parent 2cf9fdfd40
commit 16bd288e70
2 changed files with 11 additions and 2 deletions
@@ -45,8 +45,6 @@ NS_ASSUME_NONNULL_BEGIN
* Returns the index of the 'selected' profile within the array it's in
*/
- (NSInteger) getIndexOfSelectedProfile;
- (void)replaceSelectedProfileWith:(OSCProfile*)newProfile overwriteDefault:(bool)overwriteDefault;
- (NSMutableArray *) getEncodedProfiles;
// - (NSData* )getSelectedEncodedProfile;
- (void) importEncodedProfiles:(NSMutableArray* )profilesEncoded;
@@ -58,6 +56,8 @@ NS_ASSUME_NONNULL_BEGIN
* Sets the profile object with the particular index as the selected profile to be displayed on screen during game streaming
*/
- (void) setProfileToSelected:(uint32_t)index;
- (void) replaceSelectedProfileWith:(OSCProfile*)newProfile overwriteDefault:(bool)overwriteDefault;
- (void) replaceProfile:(OSCProfile*)oldProfile withProfile:(OSCProfile*)newProfile;
/**
* Saves a profile object with a particular 'name' and an array of button layers (the CALayer button layers are the objects currently visible on screen) to persistent storage
@@ -834,6 +834,15 @@ typedef NS_ENUM(NSUInteger, DecelerationRateSliderMode) {
/* show pop up notification that lets users choose to save the current OSC layout configuration as a profile they can load when they want. User can also choose to cancel out of this pop up */
- (IBAction) saveTapped:(id)sender {
/*
OSCProfile* targetProfile = [profilesManager getAllProfiles][3];
OSCProfile* currentProfile = [profilesManager getSelectedProfile];
currentProfile.name = @"RPG游戏示例 / RPG example (ZZZ in Genshin style)";
// currentProfile.name = @"Default";
[profilesManager replaceProfile:targetProfile withProfile:currentProfile];
*/
[self clearSickInput];
[OSCProfilesManager setLayoutViewBounds:self.view.bounds];