mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 06:11:50 +09:00
fake gradient background for menu buttons on titlescreen to increase contrast
This commit is contained in:
@@ -148,14 +148,14 @@ class TitleScreen(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
val off3 = cameraNodes[(i+3) fmod cameraNodes.size] * 0.025f
|
||||
|
||||
cameraNodes[i] = offM3 + offM2 + offM1 + off0 + off1 + off2 + off3
|
||||
println(cameraNodes[i])
|
||||
// println(cameraNodes[i])
|
||||
}
|
||||
|
||||
|
||||
|
||||
cameraPlayer = CameraPlayer(demoWorld, cameraAI)
|
||||
|
||||
demoWorld.worldTime.timeDelta = 100
|
||||
demoWorld.worldTime.timeDelta = 0//100
|
||||
|
||||
|
||||
IngameRenderer.setRenderedWorld(demoWorld)
|
||||
@@ -168,6 +168,8 @@ class TitleScreen(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
// fake UI for gradient overlay
|
||||
val uiFakeGradOverlay = UIFakeGradOverlay()
|
||||
uiFakeGradOverlay.setPosition(0, 0)
|
||||
uiContainer.add(uiFakeGradOverlay)
|
||||
|
||||
|
||||
uiMenu = UIRemoCon(UITitleRemoConYaml())//UITitleRemoConRoot()
|
||||
|
||||
@@ -27,11 +27,10 @@ class UIFakeGradOverlay : UICanvas() {
|
||||
|
||||
override fun updateUI(delta: Float) {}
|
||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||
gdxSetBlendMul()
|
||||
blendMul(batch)
|
||||
batch.draw(tex, 0f, 0f, App.scr.halfwf * 1.5f, App.scr.hf)
|
||||
|
||||
batch.draw(tex, 0f, 0f, App.scr.wf, App.scr.hf)
|
||||
|
||||
gdxSetBlendNormal()
|
||||
blendNormal(batch)
|
||||
}
|
||||
|
||||
override fun doOpening(delta: Float) {}
|
||||
|
||||
Reference in New Issue
Block a user