diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-11-04 07:12:52 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-03 21:12:52 +0100 |
commit | a645741ceb9a407acba9b9fa116334943207824f (patch) | |
tree | d2f6fe1b22e7cb8a62f7255bf506b46354fa3d53 | |
parent | 3c764298d747ba13f40c1f5cfb4329b62c91baaa (diff) | |
download | skyhanni-a645741ceb9a407acba9b9fa116334943207824f.tar.gz skyhanni-a645741ceb9a407acba9b9fa116334943207824f.tar.bz2 skyhanni-a645741ceb9a407acba9b9fa116334943207824f.zip |
show a gui when mouse is locked (#677)
Added a gui element to remind you while /shmouselock is enabled. #677
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java index 396946373..ec9c8dd61 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -823,5 +823,8 @@ public class MiscConfig { public Position showTimeInLimboPosition = new Position(400, 200, 1.3f); @Expose + public Position lockedMouseDisplay = new Position(400, 200, 0.8f); + + @Expose public Position inventoryLoadPos = new Position(394, 124, false, true); } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt index b4ab08459..d9887a26e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt @@ -1,8 +1,10 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.RenderUtils.renderString import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -33,4 +35,10 @@ object LockMouseLook { LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now unlocked.") } } + + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { + if (!lockedMouse) return + SkyHanniMod.feature.misc.lockedMouseDisplay.renderString("§eMouse Locked", posLabel = "Mouse Locked") + } } |