mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
more descriptive name for the blend-normal function because why there are two fucking standards for an alpha channel
This commit is contained in:
@@ -359,7 +359,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
Toolkit.fillArea(batch, bar_x, bar_y, bar_w, -bar_h)
|
||||
}
|
||||
}
|
||||
blendNormal(batch)
|
||||
blendNormalStraightAlpha(batch)
|
||||
}
|
||||
|
||||
private fun drawGamepadAxis(gamepad: TerrarumController, batch: SpriteBatch, axisX: Float, axisY: Float, uiX: Int, uiY: Int) {
|
||||
@@ -375,10 +375,10 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
|
||||
val deadzone = App.gamepadDeadzone
|
||||
|
||||
blendNormal(batch)
|
||||
blendNormalStraightAlpha(batch)
|
||||
|
||||
batch.end()
|
||||
gdxSetBlendNormal()
|
||||
gdxBlendNormalStraightAlpha()
|
||||
Terrarum.inShapeRenderer {
|
||||
it.color = uiColour
|
||||
it.rect(uiX.toFloat(), App.scr.height - uiY.toFloat(), w, -h)
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.BlendMode
|
||||
import net.torvald.terrarum.blendNormal
|
||||
import net.torvald.terrarum.blendNormalStraightAlpha
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2017-07-16.
|
||||
@@ -62,7 +62,7 @@ open class UIItemImageButton(
|
||||
|
||||
|
||||
// draw image
|
||||
blendNormal(batch)
|
||||
blendNormalStraightAlpha(batch)
|
||||
|
||||
batch.color = if (highlighted) highlightCol
|
||||
else if (mouseUp) activeCol
|
||||
|
||||
@@ -58,7 +58,7 @@ class UIItemModuleInfoCell(
|
||||
private val ccDesc = App.fontGame.toColorCode(13,13,13)
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
blendNormal(batch)
|
||||
blendNormalStraightAlpha(batch)
|
||||
|
||||
batch.color = Toolkit.Theme.COL_CELL_FILL
|
||||
Toolkit.fillArea(batch, initialX, initialY, 32, height)
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.BlendMode
|
||||
import net.torvald.terrarum.blendNormal
|
||||
import net.torvald.terrarum.blendNormalStraightAlpha
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
|
||||
/**
|
||||
@@ -102,7 +102,7 @@ open class UIItemTextButton(
|
||||
}*/
|
||||
|
||||
|
||||
blendNormal(batch)
|
||||
blendNormalStraightAlpha(batch)
|
||||
|
||||
if (hasBorder) {
|
||||
batch.color = Toolkit.Theme.COL_CELL_FILL
|
||||
|
||||
@@ -483,7 +483,7 @@ class UIItemTextLineInput(
|
||||
if (true || fboUpdateLatch) {
|
||||
fboUpdateLatch = false
|
||||
fbo.inAction(camera as OrthographicCamera, batch) { batch.inUse {
|
||||
gdxClearAndSetBlend(0f, 0f, 0f, 0f)
|
||||
gdxClearAndEnableBlend(0f, 0f, 0f, 0f)
|
||||
|
||||
it.color = Color.WHITE
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gameworld.fmod
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
* @param width width of the text input where the text gets drawn, not the entire item
|
||||
@@ -130,7 +129,7 @@ class UIItemTextSelector(
|
||||
if (fboUpdateLatch) {
|
||||
fboUpdateLatch = false
|
||||
fbo.inAction(camera as OrthographicCamera, batch) { batch.inUse {
|
||||
gdxClearAndSetBlend(0f, 0f, 0f, 0f)
|
||||
gdxClearAndEnableBlend(0f, 0f, 0f, 0f)
|
||||
|
||||
it.color = Color.WHITE
|
||||
val t = labelCache[selection]
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -174,7 +174,7 @@ class UINSMenu(
|
||||
Toolkit.fillArea(batch, it.ui.posX.toFloat(), it.ui.posY.toFloat() - LINE_HEIGHT, it.ui.width.toFloat(), LINE_HEIGHT.toFloat())
|
||||
|
||||
batch.color = titleTextCol
|
||||
blendNormal(batch)
|
||||
blendNormalStraightAlpha(batch)
|
||||
App.fontGame.draw(batch, it.title, TEXT_OFFSETX + it.ui.posX, TEXT_OFFSETY + it.ui.posY - LINE_HEIGHT)
|
||||
|
||||
// draw the list
|
||||
|
||||
Reference in New Issue
Block a user