mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-12 22:56:06 +09:00
a little bit generalised titlescreen warning printing
This commit is contained in:
@@ -336,21 +336,32 @@ class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
|||||||
val linegap = 4
|
val linegap = 4
|
||||||
val imgTxtGap = 10
|
val imgTxtGap = 10
|
||||||
val yoff = App.scr.height - App.scr.tvSafeGraphicsHeight - 64 - (3*(20+linegap)) - imgTxtGap - 9
|
val yoff = App.scr.height - App.scr.tvSafeGraphicsHeight - 64 - (3*(20+linegap)) - imgTxtGap - 9
|
||||||
if (App.is32BitJVM && uiRemoCon.currentRemoConContents.parent == null) {
|
if (uiRemoCon.currentRemoConContents.parent == null) {
|
||||||
Toolkit.drawCentered(batch, warning32bitJavaIcon, yoff)
|
var texts = emptyList<String>()
|
||||||
for (i in 0..2) {
|
var textcols = emptyList<Color>()
|
||||||
val text = Lang.get("GAME_32BIT_WARNING${i+1}", (i != 2))
|
if (App.is32BitJVM) {
|
||||||
if (i == 2) batch.color = Toolkit.Theme.COL_SELECTED
|
Toolkit.drawCentered(batch, warning32bitJavaIcon, yoff)
|
||||||
App.fontGame.draw(batch, text, ((drawWidth - App.fontGame.getWidth(text)) / 2).toFloat(), yoff + imgTxtGap + 64f + linegap + i*(20+linegap))
|
texts = (1..3).map { Lang.get("GAME_32BIT_WARNING$it", (it != 3)) }
|
||||||
|
textcols = (1..3).map { if (it == 3) Toolkit.Theme.COL_SELECTED else Color.WHITE }
|
||||||
}
|
}
|
||||||
}
|
// warn: rosetta on Apple M-chips
|
||||||
// warn: rosetta on Apple M-chips
|
else if (App.getUndesirableConditions() == "apple_execution_through_rosetta") {
|
||||||
else if (App.getUndesirableConditions() == "apple_execution_through_rosetta") {
|
texts = listOf(
|
||||||
listOf(
|
"It seems you are using a Mac with Apple Silicon but running the game through Rosetta.",
|
||||||
"It seems you are using a Mac with Apple Silicon but running the game through Rosetta.",
|
"A native build for the game is available which runs much faster than current version."
|
||||||
"A native build for the game is available which runs much faster than current version."
|
)
|
||||||
).forEachIndexed { i, text ->
|
textcols = texts.map { Color.WHITE }
|
||||||
App.fontGame.draw(batch, text, ((drawWidth - App.fontGame.getWidth(text)) / 2).toFloat(), yoff + imgTxtGap + 64f + linegap + i*(20+linegap))
|
}
|
||||||
|
|
||||||
|
|
||||||
|
texts.forEachIndexed { i, text ->
|
||||||
|
batch.color = textcols[i]
|
||||||
|
App.fontGame.draw(
|
||||||
|
batch,
|
||||||
|
text,
|
||||||
|
((drawWidth - App.fontGame.getWidth(text)) / 2).toFloat(),
|
||||||
|
yoff + imgTxtGap + 64f + linegap + i * (20 + linegap)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user