mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
debugwin: drawing ingame weatherboxes
This commit is contained in:
@@ -2,6 +2,7 @@ package net.torvald.terrarum.ui
|
||||
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.BlendMode
|
||||
@@ -74,7 +75,7 @@ open class UIItemTextButton(
|
||||
super.update(delta)
|
||||
}
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
override fun render(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
val textW = font.getWidth(label)
|
||||
val fontX = when (alignment) {
|
||||
Alignment.CENTRE -> posX + width.minus(textW).div(2) + (paddingLeft - paddingRight).div(2)
|
||||
|
||||
Reference in New Issue
Block a user