buildingmaker palette

This commit is contained in:
minjaesong
2023-10-15 12:39:04 +09:00
parent 1af172d354
commit 20f2f2f7b1
3 changed files with 47 additions and 10 deletions

View File

@@ -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()
}