mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
dither on lighting and blurring, with an option to turn them off
This commit is contained in:
@@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.Pixmap
|
||||
import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram
|
||||
import com.badlogic.gdx.utils.Disposable
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.CommonResourcePool
|
||||
@@ -22,7 +23,9 @@ object Toolkit : Disposable {
|
||||
|
||||
val DEFAULT_BOX_BORDER_COL = Color(1f, 1f, 1f, 0.2f)
|
||||
|
||||
private val shaderBlur = App.loadShaderFromFile("assets/blur.vert", "assets/blur2.frag")
|
||||
val shaderBlur: ShaderProgram
|
||||
get() = if (IngameRenderer.isDither()) IngameRenderer.shaderBlurDither else IngameRenderer.shaderBlurRaw
|
||||
|
||||
val baloonTile = TextureRegionPack("assets/graphics/gui/message_black_tileable.tga", 36, 36, flipY = true)
|
||||
|
||||
|
||||
|
||||
@@ -55,14 +55,13 @@ class UIAutosaveNotifier : UICanvas() {
|
||||
val offX = (App.scr.tvSafeGraphicsWidth * 1.25f).roundToInt().toFloat()
|
||||
val offY = App.scr.tvSafeGraphicsHeight + 9f // +9 to align to quickslot and watch UI
|
||||
|
||||
val text = if (errored) Lang["ERROR_GENERIC_TEXT"] else Lang["MENU_IO_SAVING"]
|
||||
val text = if (errored) Lang["ERROR_GENERIC_TEXT"].replace(".","") else Lang["MENU_IO_SAVING"]
|
||||
batch.color = if (errored) errorCol else normalCol
|
||||
if (!errored) batch.draw(spin, offX, offY)// else RED_X_SYMBOL
|
||||
App.fontGame.draw(batch, text, offX + 30f, offY)
|
||||
}
|
||||
|
||||
fun setAsError() {
|
||||
println("ugh, diddums")
|
||||
errored = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user