Holding shift while dragging hud components now bypasses the snap/glue feature

This commit is contained in:
noil 2019-11-03 14:09:56 -05:00
parent cd0103c60f
commit 3ce4482ddd
3 changed files with 20 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import me.rigamortis.seppuku.impl.gui.hud.anchor.AnchorPoint;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.util.math.MathHelper;
import org.lwjgl.input.Keyboard;
/**
* Author Seth
@ -154,6 +155,11 @@ public class DraggableHudComponent extends HudComponent {
if (button == 0) {
if (this.isDragging()) {
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
this.setDragging(false);
return;
}
this.anchorPoint = this.findClosest(mouseX, mouseY);
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {

View File

@ -138,6 +138,7 @@ public final class ModuleManager {
add(new HolesModule());
add(new SmallShieldModule());
add(new PullDownModule());
add(new PortalFinderModule());
this.loadExternalModules();
}

View File

@ -0,0 +1,13 @@
package me.rigamortis.seppuku.impl.module.render;
import me.rigamortis.seppuku.api.module.Module;
/**
* created by noil on 11/3/2019 at 1:55 PM
*/
public final class PortalFinderModule extends Module {
public PortalFinderModule() {
super("PortalFinder", new String[]{"PortalFinder", "PFinder"}, "Highlights nearby portals.", "NONE", -1, Module.ModuleType.RENDER);
}
}