make osdLayoutToolFingers configurable by settings menu

This commit is contained in:
True Zhuanjia
2024-08-17 21:29:44 +08:00
parent 29e43979a7
commit a1a7047370
8 changed files with 66 additions and 22 deletions
@@ -65,7 +65,7 @@
- (void)configOscLayoutTool{
if((_settings.touchMode.intValue == RELATIVE_TOUCH || _settings.touchMode.intValue == REGULAR_NATIVE_TOUCH) && _settings.onscreenControls.intValue == OnScreenControlsLevelCustom){
_oscLayoutTapRecoginizer = [[CustomTapGestureRecognizer alloc] initWithTarget:self action:@selector(layoutOSC)];
_oscLayoutTapRecoginizer.numberOfTouchesRequired = OSC_TOOL_FINGERS; //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 = 1;
_oscLayoutTapRecoginizer.delaysTouchesBegan = NO;
_oscLayoutTapRecoginizer.delaysTouchesEnded = NO;