mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 15:25:08 +01:00
Merge pull request #21 from joaoh1/1.16
🚸 Hide Ok Zoomer's extra keybinds when disabled
This commit is contained in:
@@ -20,16 +20,6 @@ repositories {
|
|||||||
repositories {
|
repositories {
|
||||||
maven { url = "https://jitpack.io" }
|
maven { url = "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
// OkZoomer
|
|
||||||
ivy {
|
|
||||||
url 'https://github.com/joaoh1/OkZoomer/releases/download/'
|
|
||||||
patternLayout {
|
|
||||||
artifact '[revision]/[module]-[revision].[ext]'
|
|
||||||
}
|
|
||||||
metadataSources() {
|
|
||||||
artifact()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
@@ -52,7 +42,7 @@ dependencies {
|
|||||||
include "com.github.lambdaurora:spruceui:${project.spruceui_version}"
|
include "com.github.lambdaurora:spruceui:${project.spruceui_version}"
|
||||||
|
|
||||||
// Compatibility mods
|
// Compatibility mods
|
||||||
modImplementation "io.github.joaoh1:okzoomer:4.0.0-alpha.4.1.16.1"
|
modImplementation "com.github.joaoh1:okzoomer:4.0.0-alpha.4plus1.1.16.1"
|
||||||
modImplementation "me.shedaniel:RoughlyEnoughItems:4.5.5"
|
modImplementation "me.shedaniel:RoughlyEnoughItems:4.5.5"
|
||||||
|
|
||||||
api project(":core")
|
api project(":core")
|
||||||
|
|||||||
@@ -10,10 +10,9 @@
|
|||||||
package me.lambdaurora.lambdacontrols.client.compat;
|
package me.lambdaurora.lambdacontrols.client.compat;
|
||||||
|
|
||||||
import io.github.joaoh1.okzoomer.client.OkZoomerClientMod;
|
import io.github.joaoh1.okzoomer.client.OkZoomerClientMod;
|
||||||
import io.github.joaoh1.okzoomer.main.OkZoomerMod;
|
import io.github.joaoh1.okzoomer.client.utils.ZoomUtils;
|
||||||
import me.lambdaurora.lambdacontrols.client.LambdaControlsClient;
|
import me.lambdaurora.lambdacontrols.client.LambdaControlsClient;
|
||||||
import me.lambdaurora.lambdacontrols.client.controller.ButtonBinding;
|
import me.lambdaurora.lambdacontrols.client.controller.ButtonBinding;
|
||||||
import org.aperlambda.lambdacommon.Identifier;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
@@ -39,25 +38,27 @@ public class OkZoomerCompat implements CompatHandler
|
|||||||
.linkKeybind(OkZoomerClientMod.zoomKeyBinding)
|
.linkKeybind(OkZoomerClientMod.zoomKeyBinding)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
new ButtonBinding.Builder("zoom.in")
|
if (ZoomUtils.areExtraKeybindsEnabled()) {
|
||||||
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, true))
|
new ButtonBinding.Builder("zoom.in")
|
||||||
.onlyInGame()
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, true))
|
||||||
.cooldown(true)
|
.onlyInGame()
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
.cooldown(true)
|
||||||
.linkKeybind(OkZoomerClientMod.increaseZoomKeyBinding)
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
.register();
|
.linkKeybind(OkZoomerClientMod.increaseZoomKeyBinding)
|
||||||
new ButtonBinding.Builder("zoom.out")
|
.register();
|
||||||
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true))
|
new ButtonBinding.Builder("zoom.out")
|
||||||
.onlyInGame()
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true))
|
||||||
.cooldown(true)
|
.onlyInGame()
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
.cooldown(true)
|
||||||
.linkKeybind(OkZoomerClientMod.decreaseZoomKeyBinding)
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
.register();
|
.linkKeybind(OkZoomerClientMod.decreaseZoomKeyBinding)
|
||||||
new ButtonBinding.Builder("zoom.reset")
|
.register();
|
||||||
.onlyInGame()
|
new ButtonBinding.Builder("zoom.reset")
|
||||||
.cooldown(true)
|
.onlyInGame()
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
.cooldown(true)
|
||||||
.linkKeybind(OkZoomerClientMod.resetZoomKeyBinding)
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
.register();
|
.linkKeybind(OkZoomerClientMod.resetZoomKeyBinding)
|
||||||
|
.register();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user