mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-21 18:28:47 -04:00
Add setting for haptic feedback
This commit is contained in:
@@ -397,7 +397,9 @@ static const NSInteger YTLiteSection = 789;
|
|||||||
createSectionGestureSelector(@"BOTTOM_SECTION", @"playerGestureBottomSelection"),
|
createSectionGestureSelector(@"BOTTOM_SECTION", @"playerGestureBottomSelection"),
|
||||||
// Pickers for configuration settings
|
// Pickers for configuration settings
|
||||||
deadzonePicker,
|
deadzonePicker,
|
||||||
sensitivityPicker
|
sensitivityPicker,
|
||||||
|
// Toggle for haptic feedback
|
||||||
|
BASIC_SWITCH(LOC(@"PLAYER_GESTURES_HAPTIC_FEEDBACK"), nil, @"playerGesturesHapticFeedback_enabled"),
|
||||||
];
|
];
|
||||||
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"Player Gestures (Beta)") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"Player Gestures (Beta)") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]];
|
||||||
[settingsViewController pushViewController:picker];
|
[settingsViewController pushViewController:picker];
|
||||||
|
@@ -909,8 +909,10 @@ BOOL isTabSelected = NO;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Provide haptic feedback to indicate a gesture start
|
// Provide haptic feedback to indicate a gesture start
|
||||||
[feedbackGenerator prepare];
|
if (IS_ENABLED(@"playerGesturesHapticFeedback_enabled")) {
|
||||||
[feedbackGenerator impactOccurred];
|
[feedbackGenerator prepare];
|
||||||
|
[feedbackGenerator impactOccurred];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Cancel the gesture if the translation is not horizontal
|
// Cancel the gesture if the translation is not horizontal
|
||||||
panGestureRecognizer.state = UIGestureRecognizerStateCancelled;
|
panGestureRecognizer.state = UIGestureRecognizerStateCancelled;
|
||||||
@@ -1230,4 +1232,7 @@ BOOL isTabSelected = NO;
|
|||||||
if (![allKeys containsObject:@"playerGesturesSensitivity"]) {
|
if (![allKeys containsObject:@"playerGesturesSensitivity"]) {
|
||||||
[[NSUserDefaults standardUserDefaults] setFloat:1.0 forKey:@"playerGesturesSensitivity"];
|
[[NSUserDefaults standardUserDefaults] setFloat:1.0 forKey:@"playerGesturesSensitivity"];
|
||||||
}
|
}
|
||||||
|
if (![allKeys containsObject:@"playerGesturesHapticFeedback_enabled"]) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"playerGesturesHapticFeedback_enabled"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "خيارات تراكب ضوابط الفيديو";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "خيارات تراكب ضوابط الفيديو";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Опции за контрол на видеото";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Опции за контрол на видеото";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Overlay-Optionen für Videosteuerungen";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Overlay-Optionen für Videosteuerungen";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opciones de superposición de controles de vídeo";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opciones de superposición de controles de vídeo";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Options de l'overlay des contrôles vidéo";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Options de l'overlay des contrôles vidéo";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "動画コントロールオーバーレイの設定";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "動画コントロールオーバーレイの設定";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opções de Sobreposição de Controles de Vídeo";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opções de Sobreposição de Controles de Vídeo";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opțiuni Overlay Controale Video";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Opțiuni Overlay Controale Video";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options";
|
||||||
|
@@ -46,6 +46,7 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Controls Overlay Options";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Kontrol Seç.";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "Video Kontrol Seç.";
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video player options
|
// Video player options
|
||||||
"VIDEO_PLAYER_OPTIONS" = "Tùy chọn trình phát video";
|
"VIDEO_PLAYER_OPTIONS" = "Tùy chọn trình phát video";
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
"TOP_SECTION" = "Top Section";
|
"TOP_SECTION" = "Top Section";
|
||||||
"MIDDLE_SECTION" = "Middle Section";
|
"MIDDLE_SECTION" = "Middle Section";
|
||||||
"BOTTOM_SECTION" = "Bottom Section";
|
"BOTTOM_SECTION" = "Bottom Section";
|
||||||
|
"PLAYER_GESTURES_HAPTIC_FEEDBACK" = "Enable Haptic Feedback";
|
||||||
|
|
||||||
// Video controls overlay options
|
// Video controls overlay options
|
||||||
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "影片區覆蓋按鈕設定";
|
"VIDEO_CONTROLS_OVERLAY_OPTIONS" = "影片區覆蓋按鈕設定";
|
||||||
|
Reference in New Issue
Block a user