better paint bars background
This commit is contained in:
parent
8e3c95159a
commit
b130d69da1
@ -49,10 +49,17 @@ class PainterScreen(menu: PainterMenu, inventory: Inventory, title: Component) :
|
||||
}
|
||||
|
||||
override fun innerRender(graphics: GuiGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
||||
graphics.renderRect(0f, 0f, width, height, color = RGBAColor.DARK_GRAY)
|
||||
graphics.renderRect(0f, 0f, width, height, color = RGBAColor.LIGHT_GRAY)
|
||||
|
||||
val color = RGBAColor.rgb(dye?.textColor ?: DyeColor.LIGHT_BLUE.textColor)
|
||||
graphics.renderRect(0f, 0f, width, height, color = color.copy(alpha = 0.4f))
|
||||
|
||||
val bgColor = color.copy(alpha = 0.25f)
|
||||
for (x in 0 ..< width.toInt()) {
|
||||
for (y in 0 ..< height.toInt()) {
|
||||
if ((x + y) % 2 == 0)
|
||||
graphics.renderRect(x.toFloat(), y.toFloat(), 1f, 1f, color = bgColor)
|
||||
}
|
||||
}
|
||||
|
||||
val multiplier = menu.dyeStoredDirect[dye]!!.toFloat() / (if (dye == null) PainterBlockEntity.MAX_WATER_STORAGE.toFloat() else PainterBlockEntity.MAX_STORAGE.toFloat())
|
||||
graphics.renderRect(0f, height * (1f - multiplier), width, height * multiplier, color = color)
|
||||
|
Loading…
Reference in New Issue
Block a user