forked from RepoMirrors/seppuku
Holding shift while dragging hud components now bypasses the snap/glue feature
This commit is contained in:
parent
cd0103c60f
commit
3ce4482ddd
|
@ -7,6 +7,7 @@ import me.rigamortis.seppuku.impl.gui.hud.anchor.AnchorPoint;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author Seth
|
* Author Seth
|
||||||
|
@ -154,6 +155,11 @@ public class DraggableHudComponent extends HudComponent {
|
||||||
|
|
||||||
if (button == 0) {
|
if (button == 0) {
|
||||||
if (this.isDragging()) {
|
if (this.isDragging()) {
|
||||||
|
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
|
||||||
|
this.setDragging(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.anchorPoint = this.findClosest(mouseX, mouseY);
|
this.anchorPoint = this.findClosest(mouseX, mouseY);
|
||||||
|
|
||||||
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {
|
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {
|
||||||
|
|
|
@ -138,6 +138,7 @@ public final class ModuleManager {
|
||||||
add(new HolesModule());
|
add(new HolesModule());
|
||||||
add(new SmallShieldModule());
|
add(new SmallShieldModule());
|
||||||
add(new PullDownModule());
|
add(new PullDownModule());
|
||||||
|
add(new PortalFinderModule());
|
||||||
|
|
||||||
this.loadExternalModules();
|
this.loadExternalModules();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue