mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
new item type, "Dynamic Item"; working text terminal
Former-commit-id: 81e6d836f5f1e6490027d38146a32d404cf9ce3e Former-commit-id: af6557340f9cd0ea0b67eb7a8825aeffe75f9d82
This commit is contained in:
@@ -2,14 +2,14 @@ package net.torvald.terrarum.ui
|
||||
|
||||
import com.jme3.math.FastMath
|
||||
import net.torvald.imagefont.GameFontBase
|
||||
import net.torvald.terrarum.gamemap.PairedMapLayer
|
||||
import net.torvald.terrarum.gameworld.PairedMapLayer
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.mapdrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.mapdrawer.MapCamera
|
||||
import net.torvald.terrarum.mapdrawer.MapDrawer
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.setBlendNormal
|
||||
import net.torvald.terrarum.setBlendScreen
|
||||
import net.torvald.terrarum.blendNormal
|
||||
import net.torvald.terrarum.blendScreen
|
||||
import org.newdawn.slick.Color
|
||||
import org.newdawn.slick.GameContainer
|
||||
import org.newdawn.slick.Graphics
|
||||
@@ -201,7 +201,7 @@ class BasicDebugInfoWindow : UICanvas {
|
||||
g.drawString("255", x.toFloat() + w + 1 - 8*3, y.toFloat() + h + 2)
|
||||
g.drawString("Histogramme", x + w / 2 - 5.5f * 8, y.toFloat() + h + 2)
|
||||
|
||||
setBlendScreen()
|
||||
blendScreen()
|
||||
for (c in 0..2) {
|
||||
for (i in 0..255) {
|
||||
var histogram_value = if (i == 255) 0 else histogram.get(c)[i]
|
||||
@@ -220,7 +220,7 @@ class BasicDebugInfoWindow : UICanvas {
|
||||
g.fillRect(bar_x, bar_y, bar_w, bar_h)
|
||||
}
|
||||
}
|
||||
setBlendNormal()
|
||||
blendNormal()
|
||||
}
|
||||
|
||||
private fun line(i: Int): Float = i * 10f
|
||||
|
||||
@@ -84,7 +84,7 @@ class ConsoleWindow : UICanvas, KeyboardControlled {
|
||||
historyIndex = -1
|
||||
|
||||
// execute
|
||||
if (key == Key.RET && commandInputPool!!.length > 0) {
|
||||
if (key == Key.RETURN && commandInputPool!!.length > 0) {
|
||||
commandHistory.add(commandInputPool!!.toString())
|
||||
executeCommand()
|
||||
commandInputPool = StringBuilder()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.torvald.terrarum.ui
|
||||
|
||||
import net.torvald.terrarum.setBlendNormal
|
||||
import net.torvald.terrarum.blendNormal
|
||||
import org.newdawn.slick.Color
|
||||
import org.newdawn.slick.Image
|
||||
import org.newdawn.slick.SpriteSheet
|
||||
|
||||
@@ -2,8 +2,8 @@ package net.torvald.terrarum.ui
|
||||
|
||||
import net.torvald.imagefont.GameFontWhite
|
||||
import com.jme3.math.FastMath
|
||||
import net.torvald.terrarum.setBlendDisable
|
||||
import net.torvald.terrarum.setBlendNormal
|
||||
import net.torvald.terrarum.blendDisable
|
||||
import net.torvald.terrarum.blendNormal
|
||||
import org.lwjgl.opengl.GL11
|
||||
import org.newdawn.slick.*
|
||||
|
||||
@@ -55,7 +55,7 @@ constructor(override var width: Int, isBlackVariant: Boolean) : UICanvas {
|
||||
}
|
||||
|
||||
override fun render(gc: GameContainer, g: Graphics) {
|
||||
setBlendDisable()
|
||||
blendDisable()
|
||||
|
||||
drawSegments(g)
|
||||
g.setDrawMode(Graphics.MODE_ALPHA_MAP)
|
||||
@@ -69,7 +69,7 @@ constructor(override var width: Int, isBlackVariant: Boolean) : UICanvas {
|
||||
g.drawString(messagesList[i], (messageWindowRadius + 4).toFloat(), (messageWindowRadius + GLYPH_HEIGHT * i).toFloat())
|
||||
}
|
||||
|
||||
setBlendNormal()
|
||||
blendNormal()
|
||||
}
|
||||
|
||||
override fun processInput(input: Input) {
|
||||
|
||||
@@ -49,4 +49,6 @@ interface UICanvas {
|
||||
* Do not modify handler!!.openCloseCounter here.
|
||||
*/
|
||||
fun endClosing(gc: GameContainer, delta: Int)
|
||||
}
|
||||
}
|
||||
|
||||
const val OPENCLOSE_GENERIC = 200
|
||||
Reference in New Issue
Block a user