20 lines
483 B
Kotlin
20 lines
483 B
Kotlin
package net.shadowfacts.cacao.util
|
|
|
|
import net.minecraft.client.gui.DrawableHelper
|
|
import net.shadowfacts.cacao.geometry.Rect
|
|
|
|
/**
|
|
* Helper methods for rendering using Minecraft's utilities from Cacao views.
|
|
*
|
|
* @author shadowfacts
|
|
*/
|
|
object RenderHelper {
|
|
|
|
/**
|
|
* Draws a solid [rect] filled with the given [color].
|
|
*/
|
|
fun fill(rect: Rect, color: Color) {
|
|
DrawableHelper.fill(rect.left.toInt(), rect.top.toInt(), rect.right.toInt(), rect.bottom.toInt(), color.argb)
|
|
}
|
|
|
|
} |