adjustable on screen controller layer transparency

This commit is contained in:
TrueZhuangjia
2024-10-15 10:48:53 +08:00
parent 8999fd625d
commit f918779fc8
20 changed files with 266 additions and 61 deletions
@@ -271,7 +271,10 @@ static NSMutableDictionary *onScreenButtonViewsDict;
// add hidden attr here
buttonState.isHidden = oscButtonLayer.isHidden;
buttonState.oscLayerSizeFactor = [OnScreenControls getControllerLayerSizeFactor:oscButtonLayer];
NSLog(@"oscLayerName: %@, sizeFactor: %f", oscButtonLayer.name, buttonState.oscLayerSizeFactor);
buttonState.backgroundAlpha = oscButtonLayer.opacity;
NSLog(@"oscLayerName: %@, opacity: %f, ", oscButtonLayer.name, buttonState.backgroundAlpha);
// buttonState.oscLayerSizeFactor = oscButtonLayer.bounds;
NSData *buttonStateEncoded = [NSKeyedArchiver archivedDataWithRootObject:buttonState requiringSecureCoding:YES error:nil];