adjustable onScreenButtonView alpha(transparency)
This commit is contained in:
1 parent
113aaa1b81
commit
8999fd625d
11 files changed
+136
-33
No files matched your search
@@ -286,6 +286,7 @@ static NSMutableDictionary *onScreenButtonViewsDict;
|
||||
buttonState.timestamp = buttonView.timestamp;
|
||||
buttonState.widthFactor = buttonView.widthFactor;
|
||||
buttonState.heightFactor = buttonView.heightFactor;
|
||||
buttonState.backgroundAlpha = buttonView.backgroundAlpha;
|
||||
NSData *buttonStateEncoded = [NSKeyedArchiver archivedDataWithRootObject:buttonState requiringSecureCoding:YES error:nil];
|
||||
[buttonStatesEncoded addObject: buttonStateEncoded];
|
||||
}];
|
||||
|
||||
@@ -28,6 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign) CGFloat widthFactor; // for OnScreenButtonView
|
||||
@property (nonatomic, assign) CGFloat heightFactor; // for OnScreenButtonView
|
||||
@property (nonatomic, assign) CGFloat oscLayerSizeFactor; // for OnScreenController CALayer
|
||||
@property (nonatomic, assign) CGFloat backgroundAlpha; // for OnScreenController CALayer
|
||||
|
||||
// @property (nonatomic, assign) BOOL hasValidPosition;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
[encoder encodeFloat:self.widthFactor forKey:@"widthFactor"];
|
||||
[encoder encodeFloat:self.heightFactor forKey:@"heightFactor"];
|
||||
[encoder encodeFloat:self.oscLayerSizeFactor forKey:@"oscLayerSizeFactor"];
|
||||
[encoder encodeFloat:self.backgroundAlpha forKey:@"backgroundAlpha"];
|
||||
}
|
||||
|
||||
- (id) initWithCoder:(NSCoder*)decoder {
|
||||
@@ -49,6 +50,7 @@
|
||||
self.widthFactor = [decoder decodeFloatForKey:@"widthFactor"];
|
||||
self.heightFactor = [decoder decodeFloatForKey:@"heightFactor"];
|
||||
self.oscLayerSizeFactor = [decoder decodeFloatForKey:@"oscLayerSizeFactor"];
|
||||
self.backgroundAlpha = [decoder decodeFloatForKey:@"backgroundAlpha"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user