aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/raeids
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/raeids')
-rw-r--r--src/main/kotlin/com/raeids/stratus/gui/ChatShortcutViewGui.kt4
-rw-r--r--src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/kotlin/com/raeids/stratus/gui/ChatShortcutViewGui.kt b/src/main/kotlin/com/raeids/stratus/gui/ChatShortcutViewGui.kt
index 6efd29c..86989c4 100644
--- a/src/main/kotlin/com/raeids/stratus/gui/ChatShortcutViewGui.kt
+++ b/src/main/kotlin/com/raeids/stratus/gui/ChatShortcutViewGui.kt
@@ -16,10 +16,10 @@ import gg.essential.vigilance.gui.settings.ButtonComponent
class ChatShortcutViewGui : WindowScreen(version = ElementaVersion.V1) {
override fun initScreen(width: Int, height: Int) {
super.initScreen(width, height)
- for ((yes, shortcut) in ChatShortcuts.shortcuts.withIndex()) {
+ for ((index, shortcut) in ChatShortcuts.shortcuts.withIndex()) {
val block = UIBlock(VigilancePalette.getBackground()).constrain {
x = 3.percent()
- y = (yes * 12).percent()
+ y = (index * 12).percent()
this.width = 94.percent()
this.height = 25.pixels()
} childOf this.window
diff --git a/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt b/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
index 8fd417b..9e454d7 100644
--- a/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
+++ b/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
@@ -21,11 +21,12 @@ import java.lang.reflect.Method
import java.nio.ByteBuffer
import java.nio.ByteOrder
import javax.imageio.ImageIO
-import kotlin.math.roundToInt
object RenderHelper {
private val regex = Regex("(?i)\\u00A7[0-9a-f]")
+ var bypassWyvtils = false
+ private set
/**
* Taken from https://github.com/Moulberry/HyChat
@@ -228,6 +229,7 @@ object RenderHelper {
val noColors = text.replace(regex, "\u00A7r")
var yes = 0
if (((Minecraft.getMinecraft().ingameGUI.chatGUI as GuiNewChatHook).textOpacity / 4) > 3) {
+ bypassWyvtils = true
for (xOff in -2..2) {
for (yOff in -2..2) {
if (xOff * xOff != yOff * yOff) {
@@ -238,6 +240,7 @@ object RenderHelper {
}
}
}
+ bypassWyvtils = false
}
yes += fontRendererIn.drawString(text, x, y, color)
return yes