aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/TabListRenderer.kt9
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(