darken icons in disabled/pressed buttons
This commit is contained in:
parent
608771f441
commit
92a9fa39df
@ -7,6 +7,7 @@ import ru.dbotthepony.mc.otm.client.render.IGUIRenderable
|
|||||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||||
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
||||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||||
|
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||||
import ru.dbotthepony.mc.otm.menu.MatteryMenu
|
import ru.dbotthepony.mc.otm.menu.MatteryMenu
|
||||||
|
|
||||||
open class LargeRectangleButtonPanel<out S : Screen>(
|
open class LargeRectangleButtonPanel<out S : Screen>(
|
||||||
@ -28,10 +29,11 @@ open class LargeRectangleButtonPanel<out S : Screen>(
|
|||||||
override fun innerRender(graphics: GuiGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
override fun innerRender(graphics: GuiGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
||||||
super.innerRender(graphics, mouseX, mouseY, partialTick)
|
super.innerRender(graphics, mouseX, mouseY, partialTick)
|
||||||
|
|
||||||
|
val color = if (isDisabled || isPressed) RGBAColor.DARK_GRAY else RGBAColor.WHITE
|
||||||
if (iconWinding != null) {
|
if (iconWinding != null) {
|
||||||
icon?.render(graphics, width = width, height = height, winding = iconWinding!!)
|
icon?.render(graphics, width = width, height = height, winding = iconWinding!!, color = color)
|
||||||
} else {
|
} else {
|
||||||
icon?.render(graphics, width = width, height = height)
|
icon?.render(graphics, width = width, height = height, color = color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user