antidrag: fix toggle antidrag

antidrag: fix toggle antidrag
This commit is contained in:
Kyle
2019-10-03 23:36:56 +01:00
committed by GitHub
parent 97df39c5d8
commit 5455fde310

View File

@@ -42,8 +42,8 @@ public interface AntiDragConfig extends Config
keyName = "alwaysOn", keyName = "alwaysOn",
name = "Always On", name = "Always On",
description = "Makes the anti-drag always active and disables the hotkey toggle", description = "Makes the anti-drag always active and disables the hotkey toggle",
disabledBy = "keybind || holdkeybind", disabledBy = "toggleKeyBind || holdKeyBind",
hide = "keybind || holdkeybind" hide = "toggleKeyBind || holdKeyBind"
) )
default boolean alwaysOn() default boolean alwaysOn()
{ {
@@ -52,26 +52,26 @@ public interface AntiDragConfig extends Config
@ConfigItem( @ConfigItem(
position = 1, position = 1,
keyName = "keybind", keyName = "toggleKeyBind",
name = "Toggle with Keybind", name = "Toggle with Keybind",
description = "Toggle anti drag on and off, rather than always on.", description = "Toggle anti drag on and off, rather than always on.",
disabledBy = "alwaysOn || holdkeybind", disabledBy = "alwaysOn || holdKeyBind",
hide = "alwaysOn || holdkeybind" hide = "alwaysOn || holdKeyBind"
) )
default boolean keybind() default boolean toggleKeyBind()
{ {
return false; return false;
} }
@ConfigItem( @ConfigItem(
position = 2, position = 2,
keyName = "holdkeybind", keyName = "holdKeyBind",
name = "Hold with Keybind", name = "Hold with Keybind",
description = "Hold anti drag key to turn it on, rather than toggle it on or off.", description = "Hold anti drag key to turn it on, rather than toggle it on or off.",
disabledBy = "alwaysOn || keybind", disabledBy = "alwaysOn || toggleKeyBind",
hide = "alwaysOn || keybind" hide = "alwaysOn || toggleKeyBind"
) )
default boolean holdkeybind() default boolean holdKeyBind()
{ {
return false; return false;
} }
@@ -82,7 +82,7 @@ public interface AntiDragConfig extends Config
description = "The keybind you want to use for antidrag", description = "The keybind you want to use for antidrag",
position = 3, position = 3,
hidden = true, hidden = true,
unhide = "keybind || holdkeybind" unhide = "toggleKeyBind || holdKeyBind"
) )
default Keybind key() default Keybind key()
{ {
@@ -106,7 +106,7 @@ public interface AntiDragConfig extends Config
description = "Disable antidrag when losing focus (like alt tabbing)", description = "Disable antidrag when losing focus (like alt tabbing)",
position = 5, position = 5,
hidden = true, hidden = true,
unhide = "keybind || holdkeybind" unhide = "toggleKeyBind || holdKeyBind"
) )
default boolean reqfocus() default boolean reqfocus()
{ {
@@ -119,7 +119,7 @@ public interface AntiDragConfig extends Config
description = "Do you really need a description?", description = "Do you really need a description?",
position = 6, position = 6,
hidden = true, hidden = true,
unhide = "keybind || holdkeybind" unhide = "toggleKeyBind || holdKeyBind"
) )
default boolean overlay() default boolean overlay()
{ {
@@ -132,7 +132,7 @@ public interface AntiDragConfig extends Config
name = "Overlay color", name = "Overlay color",
description = "Change the overlay color, duh", description = "Change the overlay color, duh",
hidden = true, hidden = true,
unhide = "keybind || holdkeybind", unhide = "toggleKeyBind || holdKeyBind",
position = 7 position = 7
) )
default Color color() default Color color()
@@ -146,7 +146,7 @@ public interface AntiDragConfig extends Config
description = "Change cursor when you have anti-drag enabled.", description = "Change cursor when you have anti-drag enabled.",
position = 8, position = 8,
hidden = true, hidden = true,
unhide = "keybind || holdkeybind" unhide = "toggleKeyBind || holdKeyBind"
) )
default boolean changeCursor() default boolean changeCursor()
{ {