mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
hit q to close the storage chest gui
This commit is contained in:
@@ -15,7 +15,11 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
/**
|
||||
* Created by minjaesong on 2017-06-10.
|
||||
*/
|
||||
class UIBasicInfo(private val player: ActorHumanoid?) : UICanvas() {
|
||||
class UIBasicInfo() : UICanvas() {
|
||||
|
||||
val player: ActorHumanoid?
|
||||
get() = Terrarum.ingame?.actorNowPlaying
|
||||
|
||||
override var width = 93
|
||||
override var height = 23
|
||||
override var openCloseTime: Second = 0f
|
||||
@@ -51,7 +55,7 @@ class UIBasicInfo(private val player: ActorHumanoid?) : UICanvas() {
|
||||
private val temperature: Int
|
||||
get() {
|
||||
if (player != null) {
|
||||
val playerTilePos = player.hIntTilewiseHitbox
|
||||
val playerTilePos = player!!.hIntTilewiseHitbox
|
||||
val tempCelsius = -273f + ((Terrarum.ingame as? TerrarumIngame)?.world?.getTemperature(playerTilePos.centeredX.toInt(), playerTilePos.centeredY.toInt()) ?: 288f)
|
||||
|
||||
return if (tempCelsius < -10)
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.torvald.terrarum.AppLoader.*
|
||||
import net.torvald.terrarum.blockstats.MinimapComposer
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
import net.torvald.terrarum.ui.*
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
@@ -17,14 +18,15 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
* Created by minjaesong on 2017-10-21.
|
||||
*/
|
||||
class UIInventoryFull(
|
||||
var actor: Pocketed,
|
||||
|
||||
toggleKeyLiteral: Int? = null, toggleButtonLiteral: Int? = null,
|
||||
toggleKeyLiteral: Int? = AppLoader.getConfigInt("config_keyinventory"), toggleButtonLiteral: Int? = AppLoader.getConfigInt("config_gamepadstart"),
|
||||
// UI positions itself? (you must g.flush() yourself after the g.translate(Int, Int))
|
||||
customPositioning: Boolean = false, // mainly used by vital meter
|
||||
doNotWarnConstant: Boolean = false
|
||||
) : UICanvas(toggleKeyLiteral, toggleButtonLiteral, customPositioning, doNotWarnConstant) {
|
||||
|
||||
val actor: ActorHumanoid
|
||||
get() = Terrarum.ingame!!.actorNowPlaying!!
|
||||
|
||||
override var width: Int = AppLoader.screenSize.screenW
|
||||
override var height: Int = AppLoader.screenSize.screenH
|
||||
override var openCloseTime: Second = 0.0f
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlin.math.roundToInt
|
||||
/**
|
||||
* Created by minjaesong on 2017-06-11.
|
||||
*/
|
||||
class UITierOneWatch(private val player: ActorHumanoid?) : UICanvas() {
|
||||
class UITierOneWatch() : UICanvas() {
|
||||
override var width = 160
|
||||
override var height = 23
|
||||
override var openCloseTime: Second = 0f
|
||||
|
||||
Reference in New Issue
Block a user