mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 10:34:06 +09:00
buildingmaker palette
This commit is contained in:
@@ -54,7 +54,10 @@ open class UIItemImageButton(
|
||||
var highlighted = false
|
||||
var extraDrawOp: (UIItem, SpriteBatch) -> Unit = { _,_ -> }
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
fun render(batch: SpriteBatch, camera: OrthographicCamera, offX: Int, offY: Int) {
|
||||
val posX = this.posX + offX
|
||||
val posY = this.posY + offY
|
||||
|
||||
// draw background
|
||||
if (highlighted) {
|
||||
BlendMode.resolve(highlightBackBlendMode, batch)
|
||||
@@ -90,6 +93,10 @@ open class UIItemImageButton(
|
||||
extraDrawOp(this, batch)
|
||||
}
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
render(batch, camera, 0, 0)
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
image.texture.dispose()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user