more descriptive name for the blend-normal function because why there are two fucking standards for an alpha channel

This commit is contained in:
minjaesong
2022-10-31 01:52:40 +09:00
parent ccef7c32a0
commit 474279aefe
42 changed files with 122 additions and 108 deletions

View File

@@ -7,7 +7,7 @@ import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.g2d.TextureRegion
import net.torvald.terrarum.CommonResourcePool
import net.torvald.terrarum.blendNormal
import net.torvald.terrarum.blendNormalStraightAlpha
import net.torvald.terrarum.toInt
import kotlin.math.roundToInt
@@ -95,7 +95,7 @@ class UIItemToggleButton(
override fun render(batch: SpriteBatch, camera: Camera) {
batch.color = Color.WHITE
blendNormal(batch)
blendNormalStraightAlpha(batch)
batch.draw(togglerBase, posX.toFloat(), posY.toFloat())
batch.draw(togglerHandle, (posX + handlePos).toFloat(), posY.toFloat())