mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
moved things a lot just so that splash screen shows up WHILE things load
This commit is contained in:
@@ -2,7 +2,7 @@ package net.torvald.terrarum.modulebasegame.ui
|
||||
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
|
||||
@@ -19,7 +19,7 @@ class Notification : UICanvas() {
|
||||
|
||||
override var height: Int = msgUI.height
|
||||
private val visibleTime = Math.min(
|
||||
Terrarum.getConfigInt("notificationshowuptime"),
|
||||
AppLoader.getConfigInt("notificationshowuptime"),
|
||||
SHOWUP_MAX
|
||||
)
|
||||
private var displayTimer = 0f
|
||||
|
||||
@@ -40,7 +40,7 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas() {
|
||||
ELuptimer += delta
|
||||
}
|
||||
|
||||
if (mouseUp || Gdx.input.isKeyPressed(Terrarum.getConfigInt("keyinteract"))) {
|
||||
if (mouseUp || Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyinteract"))) {
|
||||
ELuptimer = 0f
|
||||
ELon = true
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas() {
|
||||
val playerTilePos = player.hIntTilewiseHitbox
|
||||
val tempCelsius = -273f + ((Terrarum.ingame as? Ingame)?.world?.getTemperature(playerTilePos.centeredX.toInt(), playerTilePos.centeredY.toInt()) ?: 288f)
|
||||
|
||||
return when (Terrarum.getConfigInt("temperatureunit")) {
|
||||
return when (AppLoader.getConfigInt("temperatureunit")) {
|
||||
TEMP_KELVIN -> tempCelsius.times(1.8f).plus(32f).roundInt()
|
||||
TEMP_CELCIUS -> tempCelsius.roundInt()
|
||||
else -> tempCelsius.plus(273.15f).roundInt()
|
||||
@@ -86,10 +86,10 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas() {
|
||||
|
||||
sb.append(temperature.abs())
|
||||
|
||||
if (Terrarum.getConfigInt("temperatureunit") == 1) {
|
||||
if (AppLoader.getConfigInt("temperatureunit") == 1) {
|
||||
sb.append('"') // celsius superscript
|
||||
}
|
||||
else if (Terrarum.getConfigInt("temperatureunit") == -1) {
|
||||
else if (AppLoader.getConfigInt("temperatureunit") == -1) {
|
||||
sb.append('#') // fahrenheit subscript
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -157,10 +157,10 @@ package net.torvald.terrarum.modulebasegame.ui
|
||||
private var isEncumbered = false
|
||||
|
||||
|
||||
private val seekLeft: Int; get() = Terrarum.getConfigInt("keyleft") // getter used to support in-game keybind changing
|
||||
private val seekRight: Int; get() = Terrarum.getConfigInt("keyright") // getter used to support in-game keybind changing
|
||||
private val seekUp: Int; get() = Terrarum.getConfigInt("keyup") // getter used to support in-game keybind changing
|
||||
private val seekDown: Int; get() = Terrarum.getConfigInt("keydown") // getter used to support in-game keybind changing
|
||||
private val seekLeft: Int; get() = AppLoader.getConfigInt("keyleft") // getter used to support in-game keybind changing
|
||||
private val seekRight: Int; get() = AppLoader.getConfigInt("keyright") // getter used to support in-game keybind changing
|
||||
private val seekUp: Int; get() = AppLoader.getConfigInt("keyup") // getter used to support in-game keybind changing
|
||||
private val seekDown: Int; get() = AppLoader.getConfigInt("keydown") // getter used to support in-game keybind changing
|
||||
|
||||
|
||||
init {
|
||||
|
||||
@@ -8,11 +8,10 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorInventory.Companion.CAPACITY_MODE_NO_ENCUMBER
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorInventory.Companion.CAPACITY_MODE_NO_ENCUMBER
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
@@ -43,7 +42,7 @@ class UIInventoryFull(
|
||||
|
||||
private val SP = "${0x3000.toChar()}${0x3000.toChar()}"
|
||||
val listControlHelp: String
|
||||
get() = if (Terrarum.environment == RunningEnvironment.PC)
|
||||
get() = if (AppLoader.environment == RunningEnvironment.PC)
|
||||
"${0xe031.toChar()} ${Lang["GAME_ACTION_CLOSE"]}$SP" +
|
||||
"${0xe006.toChar()} ${Lang["GAME_INVENTORY_USE"]}$SP" +
|
||||
"${0xe011.toChar()}..${0xe010.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP" +
|
||||
|
||||
@@ -49,7 +49,7 @@ class UITierOneWatch(private val player: ActorHumanoid?) : UICanvas() {
|
||||
ELuptimer += delta
|
||||
}
|
||||
|
||||
if (mouseUp || Gdx.input.isKeyPressed(Terrarum.getConfigInt("keyinteract"))) {
|
||||
if (mouseUp || Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyinteract"))) {
|
||||
ELuptimer = 0f
|
||||
ELon = true
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.torvald.terrarum.ui.UIItemTextButtonList
|
||||
)
|
||||
|
||||
init {
|
||||
if (Terrarum.getConfigBoolean("__debug")) {
|
||||
if (AppLoader.getConfigBoolean("__debug")) {
|
||||
menuLabels.addAll(arrayOf(
|
||||
" Development Tools $",
|
||||
"Building Maker"
|
||||
@@ -117,7 +117,7 @@ import net.torvald.terrarum.ui.UIItemTextButtonList
|
||||
menubar.buttons[menuLabels.indexOf("MENU_LABEL_QUIT")].clickOnceListener = { _, _, _ -> Thread.sleep(50); System.exit(0) }
|
||||
|
||||
|
||||
if (Terrarum.getConfigBoolean("__debug")) {
|
||||
if (AppLoader.getConfigBoolean("__debug")) {
|
||||
|
||||
menubar.buttons[menuLabels.indexOf("Building Maker")].clickOnceListener = { _, _, _ ->
|
||||
this.setAsClose()
|
||||
|
||||
Reference in New Issue
Block a user