diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-03-13 20:30:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 20:30:57 +0100 |
commit | b0a857341d3ea74f338c078c081ee3260bb53769 (patch) | |
tree | badebb18610f7d26be1bd65f5e6760571454ed96 /src/main/java/at | |
parent | d411b8bf411c3750b2ad6a2e189554769495188b (diff) | |
download | skyhanni-b0a857341d3ea74f338c078c081ee3260bb53769.tar.gz skyhanni-b0a857341d3ea74f338c078c081ee3260bb53769.tar.bz2 skyhanni-b0a857341d3ea74f338c078c081ee3260bb53769.zip |
Fix: Compact Tab List Render Layer (#1161)
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt index 6f2d5d636..a2eacb07e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt @@ -15,7 +15,6 @@ import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager import net.minecraft.entity.player.EnumPlayerModelParts import net.minecraftforge.client.event.RenderGameOverlayEvent -import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object TabListRenderer { @@ -42,8 +41,7 @@ object TabListRenderer { private var isPressed = false private var isTabToggled = false - // compact scoreboard should render above other SkyHanni GUIs when toggle tab is in use. - @SubscribeEvent(priority = EventPriority.LOW) + @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.enabled) return @@ -64,11 +62,15 @@ object TabListRenderer { } } + private val tabZOffest = 10f + private fun drawTabList() { val columns = TabListReader.renderColumns if (columns.isEmpty()) return + GlStateManager.translate(0f, 0f, tabZOffest) + var maxLines = 0 var totalWidth = 0 - columnSpacing @@ -208,6 +210,7 @@ object TabListRenderer { footerY += lineHeight } } + GlStateManager.translate(0f, 0f, -tabZOffest) } private val fireSalePattern by RepoPattern.pattern( |