mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 20:44:05 +09:00
removing default batch on blendxxx() funs
This commit is contained in:
@@ -272,7 +272,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
Terrarum.fontSmallNumbers.draw(batch, "255", x.toFloat() + w + 1 - 8 * 3, y.toFloat() + h + 2)
|
||||
Terrarum.fontSmallNumbers.draw(batch, "Histogramme", x + w / 2 - 5.5f * 8, y.toFloat() + h + 2)
|
||||
|
||||
blendScreen()
|
||||
blendScreen(batch)
|
||||
for (c in 0..2) {
|
||||
for (i in 0..255) {
|
||||
var histogram_value = if (i == 255) 0 else histogram.get(c)[i]
|
||||
@@ -291,7 +291,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
batch.fillRect(bar_x, bar_y, bar_w, bar_h)
|
||||
}
|
||||
}
|
||||
blendNormal()
|
||||
blendNormal(batch)
|
||||
}
|
||||
|
||||
private fun drawGamepadAxis(batch: SpriteBatch, axisX: Float, axisY: Float, uiX: Int, uiY: Int) {
|
||||
@@ -307,7 +307,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
val padName = if (Terrarum.controller!!.name.isEmpty()) "Gamepad"
|
||||
else Terrarum.controller!!.name
|
||||
|
||||
blendNormal()
|
||||
blendNormal(batch)
|
||||
|
||||
batch.end()
|
||||
Terrarum.inShapeRenderer {
|
||||
|
||||
@@ -40,11 +40,11 @@ open class UIItemImageButton(
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
// draw background
|
||||
if (mouseUp) {
|
||||
BlendMode.resolve(activeBackBlendMode)
|
||||
BlendMode.resolve(activeBackBlendMode, batch)
|
||||
batch.color = activeBackCol
|
||||
}
|
||||
else {
|
||||
BlendMode.resolve(buttonBackBlendMode)
|
||||
BlendMode.resolve(buttonBackBlendMode, batch)
|
||||
batch.color = buttonBackCol
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ open class UIItemImageButton(
|
||||
|
||||
|
||||
// draw image
|
||||
blendNormal()
|
||||
blendNormal(batch)
|
||||
|
||||
batch.color = if (highlighted) highlightCol
|
||||
else if (mouseUp) activeCol
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.BlendMode
|
||||
import net.torvald.terrarum.fillRect
|
||||
import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.fillRect
|
||||
|
||||
|
||||
/**
|
||||
@@ -106,11 +106,11 @@ class UIItemList<Item: UIItem>(
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
batch.color = backgroundCol
|
||||
BlendMode.resolve(backgroundBlendMode)
|
||||
BlendMode.resolve(backgroundBlendMode, batch)
|
||||
batch.fillRect(posX.toFloat(), posY.toFloat(), width.toFloat(), height.toFloat())
|
||||
|
||||
batch.color = highlightBackCol
|
||||
BlendMode.resolve(highlightBackBlendMode)
|
||||
BlendMode.resolve(highlightBackBlendMode, batch)
|
||||
if (highlightY != null) {
|
||||
batch.fillRect(posX.toFloat(), highlightY!!.toFloat(), width.toFloat(), UIItemTextButton.height.toFloat())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user