mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-13 07:06:06 +09:00
font update; fallback titlescreen update
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/letterlike_symbols_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/letterlike_symbols_variable.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -895,6 +895,11 @@ public class App implements ApplicationListener {
|
|||||||
|
|
||||||
CommonResourcePool.INSTANCE.loadAll();
|
CommonResourcePool.INSTANCE.loadAll();
|
||||||
|
|
||||||
|
// check if selected IME is accessible; if not, set selected IME to none
|
||||||
|
String selectedIME = getConfigString("inputmethod");
|
||||||
|
if (!selectedIME.equals("none") && !IME.INSTANCE.getAllHighLayers().contains(selectedIME)) {
|
||||||
|
setConfig("inputmethod", "none");
|
||||||
|
}
|
||||||
|
|
||||||
if (ModMgr.INSTANCE.getModuleInfo().isEmpty()) {
|
if (ModMgr.INSTANCE.getModuleInfo().isEmpty()) {
|
||||||
|
|
||||||
@@ -910,21 +915,21 @@ public class App implements ApplicationListener {
|
|||||||
|
|
||||||
// test print
|
// test print
|
||||||
System.out.println("[App] Test printing every registered item");
|
System.out.println("[App] Test printing every registered item");
|
||||||
Terrarum.INSTANCE.getItemCodex().getItemCodex().values().stream().map(GameItem::getOriginalID).forEach((String s) -> System.out.print(s+" "));
|
Terrarum.INSTANCE.getItemCodex().getItemCodex().values().stream().map(GameItem::getOriginalID).forEach(
|
||||||
|
(String s) -> System.out.print(s + " "));
|
||||||
System.out.println();
|
System.out.println();
|
||||||
|
|
||||||
|
|
||||||
// create tile atlas
|
try {
|
||||||
printdbg(this, "Making terrain textures...");
|
// create tile atlas
|
||||||
tileMaker = new CreateTileAtlas();
|
printdbg(this, "Making terrain textures...");
|
||||||
tileMaker.invoke(false);
|
tileMaker = new CreateTileAtlas();
|
||||||
|
tileMaker.invoke(false);
|
||||||
|
|
||||||
// check if selected IME is accessible; if not, set selected IME to none
|
|
||||||
String selectedIME = getConfigString("inputmethod");
|
|
||||||
if (!selectedIME.equals("none") && !IME.INSTANCE.getAllHighLayers().contains(selectedIME)) {
|
|
||||||
setConfig("inputmethod", "none");
|
|
||||||
}
|
}
|
||||||
|
catch (NullPointerException e) {
|
||||||
|
throw new Error("TileMaker failed to load", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Terrarum.initialise();
|
Terrarum.initialise();
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,39 @@ import net.torvald.terrarum.ui.Toolkit
|
|||||||
*/
|
*/
|
||||||
class NoModuleDefaultTitlescreen(batch: SpriteBatch) : IngameInstance(batch) {
|
class NoModuleDefaultTitlescreen(batch: SpriteBatch) : IngameInstance(batch) {
|
||||||
|
|
||||||
private val wot = listOf(
|
private val wot = """No Module is currently loaded.
|
||||||
"No Module is currently loaded.",
|
Please reconfigure your Load Order on:
|
||||||
"Please review your Load Order on",
|
|
||||||
"assets/mods/LoadOrder.csv"
|
|
||||||
)
|
|
||||||
|
|
||||||
private val maxtw = wot.maxOf { App.fontGame.getWidth(it) }
|
Derzeit ist kein Modul geladen.
|
||||||
|
Bitte konfigurieren Sie Ihren Ladeauftrag neu auf:
|
||||||
|
|
||||||
|
Actualmente no hay ningún módulo cargado.
|
||||||
|
Vuelva a configurar su orden de carga en:
|
||||||
|
|
||||||
|
Moduulia ei ole ladattu tällä hetkellä.
|
||||||
|
Määritä lataustilauksesi uudelleen:
|
||||||
|
|
||||||
|
Aucun module n’est actuellement chargé.
|
||||||
|
Veuillez reconfigurer votre ordre de chargement sur :
|
||||||
|
|
||||||
|
現在ロードされたモジュールがありません。
|
||||||
|
次のパスでロードオーダーを再設定してください。
|
||||||
|
|
||||||
|
현재 불러와진 모듈이 없습니다.
|
||||||
|
다음의 경로에서 불러오기 순서를 재설정하십시오.
|
||||||
|
|
||||||
|
В настоящее время модуль не загружен.
|
||||||
|
Измените конфигурацию вашего порядка загрузки на:
|
||||||
|
|
||||||
|
ไม่มีการโหลดโมดูลในขณะนี้
|
||||||
|
โปรดกำหนดค่าคำสั่งซื้อการโหลดของคุณใหม่เมื่อ:
|
||||||
|
|
||||||
|
当前未加载任何模块。请重新配置您的加载顺序:
|
||||||
|
當前未加載任何模塊。請重新配置您的加載順序:
|
||||||
|
|
||||||
|
\c\a assets/mods/LoadOrder.csv""".split('\n')
|
||||||
|
|
||||||
|
private val maxtw = wot.maxOf { App.fontGameFBO.getWidth(it) }
|
||||||
|
|
||||||
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, App.scr.width, App.scr.height, true)
|
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, App.scr.width, App.scr.height, true)
|
||||||
|
|
||||||
@@ -27,21 +53,50 @@ class NoModuleDefaultTitlescreen(batch: SpriteBatch) : IngameInstance(batch) {
|
|||||||
gdxClearAndSetBlend(0f, 0f, 0f, 0f)
|
gdxClearAndSetBlend(0f, 0f, 0f, 0f)
|
||||||
|
|
||||||
if (!init) {
|
if (!init) {
|
||||||
val lh = 36f
|
val lh = 20f
|
||||||
|
val pbreak = 8f
|
||||||
val th = lh * wot.size
|
val th = lh * wot.size
|
||||||
|
|
||||||
|
val heights = FloatArray(wot.size)
|
||||||
|
|
||||||
|
// build y-pos map for strings
|
||||||
|
wot.tail().forEachIndexed { index, s ->
|
||||||
|
heights[index + 1] = heights[index] + (if (s.isBlank()) pbreak else lh)
|
||||||
|
}
|
||||||
|
|
||||||
|
// vertically centre the above
|
||||||
|
val centering = (App.scr.hf - heights.last() - App.fontGameFBO.lineHeight) / 2f
|
||||||
|
|
||||||
fbo.inAction(null, null) {
|
fbo.inAction(null, null) {
|
||||||
gdxClearAndSetBlend(.094f, .094f, .094f, 1f)
|
gdxClearAndSetBlend(.094f, .094f, .094f, 1f)
|
||||||
batch.inUse {
|
batch.inUse {
|
||||||
batch.color = Color.WHITE
|
batch.color = Color.WHITE
|
||||||
wot.forEachIndexed { index, s ->
|
wot.forEachIndexed { index, s ->
|
||||||
App.fontGame.draw(batch, s, (Toolkit.drawWidth - maxtw) / 2f, (App.scr.height - th) / 2f + lh * index)
|
if (s.startsWith('\\')) {
|
||||||
|
val tagsSplit = s.indexOfFirst { it == ' ' }
|
||||||
|
val tagsBulk = s.substring(0, tagsSplit)
|
||||||
|
|
||||||
|
val tags = tagsBulk.split('\\').filter { it.isNotBlank() }
|
||||||
|
val text = s.substring(tagsSplit + 1)
|
||||||
|
|
||||||
|
if (tags.contains("a")) batch.color = Toolkit.Theme.COL_HIGHLIGHT else batch.color = Color.WHITE
|
||||||
|
|
||||||
|
if (tags.contains("c"))
|
||||||
|
App.fontGameFBO.draw(batch, text, (Toolkit.drawWidth - App.fontGameFBO.getWidth(text)) / 2f, heights[index] + centering)
|
||||||
|
else
|
||||||
|
App.fontGameFBO.draw(batch, text, (Toolkit.drawWidth - maxtw) / 2f, heights[index] + centering)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
batch.color = Color.WHITE
|
||||||
|
App.fontGameFBO.draw(batch, s, (Toolkit.drawWidth - maxtw) / 2f, heights[index] + centering)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
batch.inUse {
|
batch.inUse {
|
||||||
|
batch.color = Color.WHITE
|
||||||
batch.draw(fbo.colorBufferTexture, 0f, 0f)
|
batch.draw(fbo.colorBufferTexture, 0f, 0f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user