Cacao: Fix button not flooring offsets
This commit is contained in:
parent
c15700bf5d
commit
b435948ee3
|
@ -8,6 +8,7 @@ import net.shadowfacts.cacao.util.RenderHelper
|
|||
import net.shadowfacts.cacao.view.NinePatchView
|
||||
import net.shadowfacts.cacao.view.View
|
||||
import net.shadowfacts.kiwidsl.dsl
|
||||
import kotlin.math.floor
|
||||
|
||||
/**
|
||||
* An abstract button class. Cannot be constructed directly, used for creating button implementations with their own
|
||||
|
@ -82,7 +83,7 @@ abstract class AbstractButton<Impl: AbstractButton<Impl>>(val content: View, val
|
|||
|
||||
override fun draw(matrixStack: MatrixStack, mouse: Point, delta: Float) {
|
||||
RenderHelper.pushMatrix()
|
||||
RenderHelper.translate(frame.left, frame.top)
|
||||
RenderHelper.translate(floor(frame.left), floor(frame.top))
|
||||
|
||||
RenderHelper.fill(matrixStack, bounds, backgroundColor)
|
||||
|
||||
|
|
Loading…
Reference in New Issue