aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 102013758..d32ff9ea9 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -75,7 +75,7 @@ object RenderUtils {
private val beaconBeam = ResourceLocation("textures/entity/beacon_beam.png")
private val matrixBuffer: FloatBuffer = GLAllocation.createDirectFloatBuffer(16)
- private val colourBuffer: FloatBuffer = GLAllocation.createDirectFloatBuffer(16)
+ private val colorBuffer: FloatBuffer = GLAllocation.createDirectFloatBuffer(16)
private val bezier2Buffer: FloatBuffer = GLAllocation.createDirectFloatBuffer(9)
infix fun Slot.highlight(color: LorenzColor) {
@@ -1009,12 +1009,12 @@ object RenderUtils {
y: Float,
shadow: Boolean,
len: Int,
- colour: Int,
+ color: Int,
) {
val strLen = fr.getStringWidth(str)
var factor = len / strLen.toFloat()
factor = 1f.coerceAtMost(factor)
- TextRenderUtils.drawStringScaled(str, fr, x, y, shadow, colour, factor)
+ TextRenderUtils.drawStringScaled(str, fr, x, y, shadow, color, factor)
}
fun LorenzRenderWorldEvent.drawDynamicText(
@@ -1608,14 +1608,14 @@ object RenderUtils {
fun LorenzRenderWorldEvent.outlineTopFace(
boundingBox: AxisAlignedBB,
lineWidth: Int,
- colour: Color,
+ color: Color,
depth: Boolean,
) {
val (cornerOne, cornerTwo, cornerThree, cornerFour) = boundingBox.getCorners(boundingBox.maxY)
- this.draw3DLine(cornerOne, cornerTwo, colour, lineWidth, depth)
- this.draw3DLine(cornerTwo, cornerThree, colour, lineWidth, depth)
- this.draw3DLine(cornerThree, cornerFour, colour, lineWidth, depth)
- this.draw3DLine(cornerFour, cornerOne, colour, lineWidth, depth)
+ this.draw3DLine(cornerOne, cornerTwo, color, lineWidth, depth)
+ this.draw3DLine(cornerTwo, cornerThree, color, lineWidth, depth)
+ this.draw3DLine(cornerThree, cornerFour, color, lineWidth, depth)
+ this.draw3DLine(cornerFour, cornerOne, color, lineWidth, depth)
}
// TODO nea please merge with 'draw3DLine'
@@ -1861,9 +1861,9 @@ object RenderUtils {
}
fun getAlpha(): Float {
- colourBuffer.clear()
- GlStateManager.getFloat(GL11.GL_CURRENT_COLOR, colourBuffer)
- if (colourBuffer.limit() < 4) return 1f
- return colourBuffer.get(3)
+ colorBuffer.clear()
+ GlStateManager.getFloat(GL11.GL_CURRENT_COLOR, colorBuffer)
+ if (colorBuffer.limit() < 4) return 1f
+ return colorBuffer.get(3)
}
}