|
3 | 3 | import static java.lang.Boolean.FALSE; |
4 | 4 | import static java.lang.Boolean.TRUE; |
5 | 5 | import static app.revanced.extension.shared.settings.Setting.parent; |
| 6 | +import static app.revanced.extension.shared.settings.Setting.parentsAny; |
6 | 7 | import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.IGNORE; |
7 | 8 | import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.MANUAL_SKIP; |
8 | 9 | import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.SKIP_AUTOMATICALLY; |
9 | 10 | import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.SKIP_AUTOMATICALLY_ONCE; |
10 | 11 |
|
11 | 12 | import app.revanced.extension.shared.settings.BaseSettings; |
12 | 13 | import app.revanced.extension.shared.settings.BooleanSetting; |
| 14 | +import app.revanced.extension.shared.settings.EnumSetting; |
13 | 15 | import app.revanced.extension.shared.settings.FloatSetting; |
14 | 16 | import app.revanced.extension.shared.settings.IntegerSetting; |
15 | 17 | import app.revanced.extension.shared.settings.LongSetting; |
16 | 18 | import app.revanced.extension.shared.settings.StringSetting; |
17 | 19 | import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings; |
| 20 | +import app.revanced.extension.youtube.swipecontrols.SwipeControlsConfigurationProvider.SwipeOverlayStyle; |
18 | 21 |
|
19 | 22 | @SuppressWarnings("deprecation") |
20 | 23 | public class Settings extends BaseSettings { |
@@ -54,6 +57,35 @@ public class Settings extends BaseSettings { |
54 | 57 | public static final BooleanSetting SETTINGS_SEARCH_HISTORY = new BooleanSetting("revanced_settings_search_history", TRUE, true); |
55 | 58 | public static final StringSetting SETTINGS_SEARCH_ENTRIES = new StringSetting("revanced_settings_search_entries", "", true); |
56 | 59 |
|
| 60 | + // Swipe controls |
| 61 | + public static final BooleanSetting SWIPE_CHANGE_VIDEO = new BooleanSetting("revanced_swipe_change_video", FALSE, true); |
| 62 | + public static final BooleanSetting SWIPE_BRIGHTNESS = new BooleanSetting("revanced_swipe_brightness", FALSE, true); |
| 63 | + public static final BooleanSetting SWIPE_VOLUME = new BooleanSetting("revanced_swipe_volume", FALSE, true); |
| 64 | + public static final BooleanSetting SWIPE_PRESS_TO_ENGAGE = new BooleanSetting("revanced_swipe_press_to_engage", FALSE, true, |
| 65 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 66 | + public static final BooleanSetting SWIPE_HAPTIC_FEEDBACK = new BooleanSetting("revanced_swipe_haptic_feedback", TRUE, true, |
| 67 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 68 | + public static final IntegerSetting SWIPE_MAGNITUDE_THRESHOLD = new IntegerSetting("revanced_swipe_threshold", 30, true, |
| 69 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 70 | + public static final IntegerSetting SWIPE_VOLUME_SENSITIVITY = new IntegerSetting("revanced_swipe_volume_sensitivity", 1, true, parent(SWIPE_VOLUME)); |
| 71 | + public static final EnumSetting<SwipeOverlayStyle> SWIPE_OVERLAY_STYLE = new EnumSetting<>("revanced_swipe_overlay_style", SwipeOverlayStyle.HORIZONTAL,true, |
| 72 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 73 | + public static final IntegerSetting SWIPE_OVERLAY_TEXT_SIZE = new IntegerSetting("revanced_swipe_text_overlay_size", 14, true, |
| 74 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 75 | + public static final IntegerSetting SWIPE_OVERLAY_OPACITY = new IntegerSetting("revanced_swipe_overlay_background_opacity", 60, true, |
| 76 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 77 | + public static final StringSetting SWIPE_OVERLAY_BRIGHTNESS_COLOR = new StringSetting("revanced_swipe_overlay_progress_brightness_color", "#FFFFFF", true, |
| 78 | + parent(SWIPE_BRIGHTNESS)); |
| 79 | + public static final StringSetting SWIPE_OVERLAY_VOLUME_COLOR = new StringSetting("revanced_swipe_overlay_progress_volume_color", "#FFFFFF", true, |
| 80 | + parent(SWIPE_VOLUME)); |
| 81 | + public static final LongSetting SWIPE_OVERLAY_TIMEOUT = new LongSetting("revanced_swipe_overlay_timeout", 500L, true, |
| 82 | + parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); |
| 83 | + public static final BooleanSetting SWIPE_SAVE_AND_RESTORE_BRIGHTNESS = new BooleanSetting("revanced_swipe_save_and_restore_brightness", TRUE, true, |
| 84 | + parent(SWIPE_BRIGHTNESS)); |
| 85 | + public static final FloatSetting SWIPE_BRIGHTNESS_VALUE = new FloatSetting("revanced_swipe_brightness_value", -1f); |
| 86 | + public static final BooleanSetting SWIPE_LOWEST_VALUE_ENABLE_AUTO_BRIGHTNESS = new BooleanSetting("revanced_swipe_lowest_value_enable_auto_brightness", FALSE, true, |
| 87 | + parent(SWIPE_BRIGHTNESS)); |
| 88 | + |
57 | 89 | // SponsorBlock |
58 | 90 | public static final BooleanSetting SB_ENABLED = new BooleanSetting("sb_enabled", TRUE); |
59 | 91 | /** Do not use id setting directly. Instead use {@link SponsorBlockSettings}. */ |
|
0 commit comments