mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 06:11:50 +09:00
modloader: locale autoloader
This commit is contained in:
@@ -211,6 +211,12 @@ object ModMgr {
|
||||
GameRetextureLoader(moduleName)
|
||||
}
|
||||
|
||||
// add locales if exists
|
||||
if (hasFile(moduleName, "locales")) {
|
||||
printdbg(this, "Trying to load Locales on ${moduleName}")
|
||||
GameLanguageLoader(moduleName)
|
||||
}
|
||||
|
||||
// run entry script in entry point
|
||||
if (entryPoint.isNotBlank()) {
|
||||
var newClass: Class<*>? = null
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIQuickslotBar.Companion.COMMON_OPEN_CLOSE
|
||||
import net.torvald.terrarum.ui.Movement
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
@@ -26,7 +27,7 @@ class UIScreenZoom : UICanvas(
|
||||
handler.allowESCtoClose = false
|
||||
}
|
||||
|
||||
val zoomText = "${getKeycapPC(handler.toggleKey!!)} $EMDASH Zoom Out"
|
||||
val zoomText = "${getKeycapPC(handler.toggleKey!!)} ${Lang["GAME_ACTION_ZOOM_OUT"]}"
|
||||
|
||||
override var width = App.fontGame.getWidth(zoomText)
|
||||
override var height = App.fontGame.lineHeight.toInt()
|
||||
|
||||
@@ -86,7 +86,7 @@ class UIItemModuleInfoCell(
|
||||
batch.draw(modIcon, initialX + 35f, initialY + 12f)
|
||||
batch.shader = null
|
||||
batch.color = Color.WHITE
|
||||
App.fontGame.draw(batch, "$ccZero${modName.toUpperCase()}$ccNum $modVer", initialX + 86f + 3f, initialY.toFloat())
|
||||
App.fontGame.draw(batch, "$ccZero${modProp.properName}$ccNum $modVer", initialX + 86f + 3f, initialY.toFloat())
|
||||
if (modErrored)
|
||||
App.fontGame.draw(batch, "$emphRed${modErrors.first().cause?.message}", initialX + 86f + 3f, initialY + 24f)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user