pip tool box special entry
This commit is contained in:
1 parent
d263482f7e
commit
35a2c1111d
3 files changed
+43
-6
No files matched your search
@@ -1521,7 +1521,7 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
</stackView>
|
</stackView>
|
||||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="20" id="hvN-TZ-ziV" userLabel="pipStack">
|
<stackView opaque="NO" contentMode="scaleToFill" spacing="20" id="hvN-TZ-ziV" userLabel="pipStack">
|
||||||
<rect key="frame" x="382" y="1618" width="280" height="31"/>
|
<rect key="frame" x="437" y="1618" width="280" height="31"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable PiP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Ul-P6-eUk" userLabel="pipLabel">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable PiP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Ul-P6-eUk" userLabel="pipLabel">
|
||||||
|
|||||||
@@ -214,6 +214,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"[ Enter picture-in-picture mode ]" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "[ 进入画中画模式 ]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "[ 进入画中画模式 ]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "[ 进入画中画模式 ]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"[ Open on-screen widget tool ]" : {
|
"[ Open on-screen widget tool ]" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|||||||
@@ -200,10 +200,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)configOscLayoutTool{
|
- (void)updateToolboxSpecialEntries{
|
||||||
if([self isOscLayoutToolEnabled]){
|
if([self isOscLayoutToolEnabled]){
|
||||||
if(![toolBoxViewController.specialEntries containsObject:@"widgetLayoutTool"]) [toolBoxViewController.specialEntries insertObject:@"widgetLayoutTool" atIndex:0];
|
if(![toolBoxViewController.specialEntries containsObject:@"widgetLayoutTool"]) [toolBoxViewController.specialEntries insertObject:@"widgetLayoutTool" atIndex:0];
|
||||||
if(![toolBoxViewController.specialEntries containsObject:@"widgetSwitchTool"]) [toolBoxViewController.specialEntries insertObject:@"widgetSwitchTool" atIndex:1];
|
if(![toolBoxViewController.specialEntries containsObject:@"widgetSwitchTool"]) [toolBoxViewController.specialEntries insertObject:@"widgetSwitchTool" atIndex:1];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
[toolBoxViewController.specialEntries removeObject:@"widgetLayoutTool"];
|
||||||
|
[toolBoxViewController.specialEntries removeObject:@"widgetSwitchTool"];
|
||||||
|
}
|
||||||
|
if(_settings.enablePIP){
|
||||||
|
if(![toolBoxViewController.specialEntries containsObject:@"enterPip"]) [toolBoxViewController.specialEntries addObject:@"enterPip"];
|
||||||
|
}
|
||||||
|
else [toolBoxViewController.specialEntries removeObject:@"enterPip"];
|
||||||
|
|
||||||
|
NSLog(@"toolBoxViewController.specialEntries %@", toolBoxViewController.specialEntries);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)configOscLayoutTool{
|
||||||
|
if([self isOscLayoutToolEnabled]){
|
||||||
_oscLayoutTapRecoginizer = [[CustomTapGestureRecognizer alloc] initWithTarget:self action:@selector(openWidgetLayoutTool)];
|
_oscLayoutTapRecoginizer = [[CustomTapGestureRecognizer alloc] initWithTarget:self action:@selector(openWidgetLayoutTool)];
|
||||||
_oscLayoutTapRecoginizer.numberOfTouchesRequired = _settings.oscLayoutToolFingers.intValue; //tap a predefined number of fingers to open osc layout tool
|
_oscLayoutTapRecoginizer.numberOfTouchesRequired = _settings.oscLayoutToolFingers.intValue; //tap a predefined number of fingers to open osc layout tool
|
||||||
_oscLayoutTapRecoginizer.tapDownTimeThreshold = 0.2;
|
_oscLayoutTapRecoginizer.tapDownTimeThreshold = 0.2;
|
||||||
@@ -227,15 +242,13 @@
|
|||||||
_layoutOnScreenControlsVC.view.backgroundColor = UIColor.clearColor;
|
_layoutOnScreenControlsVC.view.backgroundColor = UIColor.clearColor;
|
||||||
_layoutOnScreenControlsVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
_layoutOnScreenControlsVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
[toolBoxViewController.specialEntries removeObject:@"widgetLayoutTool"];
|
|
||||||
[toolBoxViewController.specialEntries removeObject:@"widgetSwitchTool"];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)presentCommandManagerViewController{
|
- (void)presentCommandManagerViewController{
|
||||||
|
ToolboxViewController* oldToolboxVC = toolBoxViewController;
|
||||||
toolBoxViewController = [[ToolboxViewController alloc] init];
|
toolBoxViewController = [[ToolboxViewController alloc] init];
|
||||||
toolBoxViewController.specialEntryDelegate = self;
|
toolBoxViewController.specialEntryDelegate = self;
|
||||||
|
toolBoxViewController.specialEntries = oldToolboxVC.specialEntries;
|
||||||
[self configOscLayoutTool];
|
[self configOscLayoutTool];
|
||||||
[self presentViewController:toolBoxViewController animated:YES completion:^{
|
[self presentViewController:toolBoxViewController animated:YES completion:^{
|
||||||
//[self->toolBoxViewController setupConstraints];
|
//[self->toolBoxViewController setupConstraints];
|
||||||
@@ -296,6 +309,7 @@
|
|||||||
_settings = [[[DataManager alloc] init] getSettings]; //StreamFrameViewController retrieve the settings here.
|
_settings = [[[DataManager alloc] init] getSettings]; //StreamFrameViewController retrieve the settings here.
|
||||||
overlayLevel = _settings.statsOverlayLevel.intValue;
|
overlayLevel = _settings.statsOverlayLevel.intValue;
|
||||||
[self configOscLayoutTool];
|
[self configOscLayoutTool];
|
||||||
|
[self updateToolboxSpecialEntries];
|
||||||
[self configSwipeGestures];
|
[self configSwipeGestures];
|
||||||
[self configZoomGestureAndAddStreamView];
|
[self configZoomGestureAndAddStreamView];
|
||||||
[self->_streamView disableOnScreenControls]; //don't know why but this must be called outside the streamview class, just put it here. execute in streamview class cause hang
|
[self->_streamView disableOnScreenControls]; //don't know why but this must be called outside the streamview class, just put it here. execute in streamview class cause hang
|
||||||
|
|||||||
Reference in new issue
Block a user