mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
when it's not dev build, title bar shows less info
they take some processing time
This commit is contained in:
@@ -6,13 +6,12 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.jme3.math.FastMath
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.worlddrawer.FeaturesDrawer
|
||||
import net.torvald.terrarum.Terrarum.mouseTileX
|
||||
import net.torvald.terrarum.Terrarum.mouseTileY
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
|
||||
import net.torvald.terrarum.worlddrawer.FeaturesDrawer
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-03-14.
|
||||
@@ -91,8 +90,8 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
+ "${(hitbox?.endY?.div(FeaturesDrawer.TILE_SIZE))?.toInt()}"
|
||||
+ ")")
|
||||
|
||||
printLine(batch, 3, "veloX reported $ccG${player.externalForce?.x}")
|
||||
printLine(batch, 4, "veloY reported $ccG${player.externalForce?.y}")
|
||||
printLine(batch, 3, "veloX reported $ccG${player.externalForce.x}")
|
||||
printLine(batch, 4, "veloY reported $ccG${player.externalForce.y}")
|
||||
|
||||
printLine(batch, 5, "p_WalkX $ccG${player.controllerMoveDelta?.x}")
|
||||
printLine(batch, 6, "p_WalkY $ccG${player.controllerMoveDelta?.y}")
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.roundInt
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ abstract class UICanvas(
|
||||
}
|
||||
|
||||
|
||||
inline fun addSubUI(ui: UICanvas) {
|
||||
fun addSubUI(ui: UICanvas) {
|
||||
handler.addSubUI(ui)
|
||||
}
|
||||
|
||||
@@ -200,23 +200,23 @@ abstract class UICanvas(
|
||||
|
||||
// handler func aliases //
|
||||
|
||||
inline fun setPosition(x: Int, y: Int) {
|
||||
fun setPosition(x: Int, y: Int) {
|
||||
handler.setPosition(x, y)
|
||||
}
|
||||
|
||||
inline fun setAsAlwaysVisible() {
|
||||
fun setAsAlwaysVisible() {
|
||||
handler.setAsAlwaysVisible()
|
||||
}
|
||||
|
||||
inline fun setAsOpen() {
|
||||
fun setAsOpen() {
|
||||
handler.setAsOpen()
|
||||
}
|
||||
|
||||
inline fun setAsClose() {
|
||||
fun setAsClose() {
|
||||
handler.setAsClose()
|
||||
}
|
||||
|
||||
inline fun toggleOpening() {
|
||||
fun toggleOpening() {
|
||||
handler.toggleOpening()
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ abstract class UIItem(var parentUI: UICanvas) { // do not replace parentUI to UI
|
||||
get() = relativeMouseX in 0..width - 1 && relativeMouseY in 0..height - 1
|
||||
/** If mouse is hovering over it and mouse is down */
|
||||
open val mousePushed: Boolean
|
||||
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("mouseprimary")!!)
|
||||
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("mouseprimary"))
|
||||
|
||||
|
||||
/** UI to call (show up) while mouse is up */
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.*
|
||||
import java.lang.Error
|
||||
|
||||
/**
|
||||
* Nextstep-themed menu bar with mandatory title line
|
||||
@@ -43,8 +42,8 @@ class UINSMenu(
|
||||
private data class MenuPack(val title: String, val ui: UIItemTextButtonList)
|
||||
|
||||
private fun ArrayList<MenuPack>.push(item: MenuPack) { this.add(item) }
|
||||
private fun ArrayList<MenuPack>.pop() = this.removeAt(this.lastIndex)!!
|
||||
private fun ArrayList<MenuPack>.peek() = this.last()!!
|
||||
private fun ArrayList<MenuPack>.pop() = this.removeAt(this.lastIndex)
|
||||
private fun ArrayList<MenuPack>.peek() = this.last()
|
||||
|
||||
|
||||
val selectedIndex: Int?
|
||||
|
||||
Reference in New Issue
Block a user