diff --git a/assets/locales/de/terrarum.json b/assets/locales/de/terrarum.json index f3474ce24..5b8f982d6 100644 --- a/assets/locales/de/terrarum.json +++ b/assets/locales/de/terrarum.json @@ -18,5 +18,5 @@ "MENU_OPTIONS_PARTICLES": "Partikel", "MENU_IO_IMPORT": "Importieren", "APP_NOMODULE_1": "Derzeit ist kein Modul geladen.", - "APP_NOMODULE_2": "Bitte konfigurieren Sie Ihren Ladeauftrag neu auf:" + "APP_NOMODULE_2": "Bitte konfigurieren Sie Ihre Ladereihenfolge und starten Sie neu:" } \ No newline at end of file diff --git a/assets/locales/en/terrarum.json b/assets/locales/en/terrarum.json index e77178eba..072840365 100644 --- a/assets/locales/en/terrarum.json +++ b/assets/locales/en/terrarum.json @@ -22,5 +22,5 @@ "MENU_OPTIONS_PARTICLES": "Particles", "MENU_IO_IMPORT": "Import", "APP_NOMODULE_1": "No Module is currently loaded.", - "APP_NOMODULE_2": "Please reconfigure your Load Order on:" + "APP_NOMODULE_2": "Please configure your Load Order and restart:" } \ No newline at end of file diff --git a/assets/locales/es/terrarum.json b/assets/locales/es/terrarum.json index 8e4417c45..f942b41ca 100644 --- a/assets/locales/es/terrarum.json +++ b/assets/locales/es/terrarum.json @@ -18,5 +18,5 @@ "MENU_OPTIONS_PARTICLES": "Partícula", "MENU_IO_IMPORT": "Importar", "APP_NOMODULE_1": "Actualmente no hay ningún módulo cargado.", - "APP_NOMODULE_2": "Vuelva a configurar su orden de carga en:" + "APP_NOMODULE_2": "Configure su orden de carga y reinicie:" } \ No newline at end of file diff --git a/assets/locales/fiFI/terrarum.json b/assets/locales/fiFI/terrarum.json index 494f1880f..38c90dc33 100644 --- a/assets/locales/fiFI/terrarum.json +++ b/assets/locales/fiFI/terrarum.json @@ -18,5 +18,5 @@ "MENU_OPTIONS_PARTICLES": "Hiukkaset", "MENU_IO_IMPORT": "Tuo", "APP_NOMODULE_1": "Moduulia ei ole ladattu tällä hetkellä.", - "APP_NOMODULE_2": "Määritä lataustilauksesi uudelleen:" + "APP_NOMODULE_2": "Määritä latausjärjestys ja käynnistä se uudelleen:" } \ No newline at end of file diff --git a/assets/locales/frFR/terrarum.json b/assets/locales/frFR/terrarum.json index 3805a95bb..c32ac06ac 100644 --- a/assets/locales/frFR/terrarum.json +++ b/assets/locales/frFR/terrarum.json @@ -19,5 +19,5 @@ "MENU_OPTIONS_PARTICLES": "Particules", "MENU_IO_IMPORT": "Importer", "APP_NOMODULE_1": "Aucun module n’est actuellement chargé.", - "APP_NOMODULE_2": "Veuillez reconfigurer votre ordre de chargement sur :" + "APP_NOMODULE_2": "Veuillez configurer votre Load Order et redémarrer :" } \ No newline at end of file diff --git a/assets/locales/hiIN/terrarum.json b/assets/locales/hiIN/terrarum.json index 16d58ace5..d54faee62 100644 --- a/assets/locales/hiIN/terrarum.json +++ b/assets/locales/hiIN/terrarum.json @@ -18,5 +18,5 @@ "MENU_OPTIONS_PARTICLES": "कणों", "MENU_IO_IMPORT": "Import", "APP_NOMODULE_1": "वर्तमान में कोई मॉड्यूल लोड नहीं है।", - "APP_NOMODULE_2": "कृपया निम्न फ़ाइल पर अपना लोड ऑर्डर पुन: कॉन्फ़िगर करें:" + "APP_NOMODULE_2": "कृपया अपना लोड ऑर्डर कॉन्फ़िगर करें और पुनः आरंभ करें:" } diff --git a/assets/locales/jaJP/terrarum.json b/assets/locales/jaJP/terrarum.json index ab27fdc15..4376adef7 100644 --- a/assets/locales/jaJP/terrarum.json +++ b/assets/locales/jaJP/terrarum.json @@ -18,5 +18,5 @@ "MENU_OPTIONS_PARTICLES": "粒子の数", "MENU_IO_IMPORT": "インポート", "APP_NOMODULE_1": "現在ロードされたモジュールがありません。", - "APP_NOMODULE_2": "次のファイルでロードオーダーを再設定してください。" + "APP_NOMODULE_2": "次のファイルでロードオーダーを設定してゲームを再起動してください。" } \ No newline at end of file diff --git a/assets/locales/koKR/terrarum.json b/assets/locales/koKR/terrarum.json index 0a8ebe85e..1a1799c51 100644 --- a/assets/locales/koKR/terrarum.json +++ b/assets/locales/koKR/terrarum.json @@ -21,5 +21,5 @@ "MENU_OPTIONS_PARTICLES": "입자 수", "MENU_IO_IMPORT": "가져오기", "APP_NOMODULE_1": "현재 불러와진 모듈이 없습니다.", - "APP_NOMODULE_2": "다음의 파일에서 불러오기 순서를 재설정하십시오." + "APP_NOMODULE_2": "다음의 파일에서 불러오기 순서를 설정하고 게임을 재시작하십시오." } diff --git a/assets/locales/ruRU/terrarum.json b/assets/locales/ruRU/terrarum.json index 6b5ca1f4a..2d6395ec7 100644 --- a/assets/locales/ruRU/terrarum.json +++ b/assets/locales/ruRU/terrarum.json @@ -17,5 +17,5 @@ "MENU_OPTIONS_PARTICLES": "Частица", "MENU_IO_IMPORT": "Импорт", "APP_NOMODULE_1": "В настоящее время модуль не загружен.", - "APP_NOMODULE_2": "Измените конфигурацию вашего порядка загрузки на:" + "APP_NOMODULE_2": "Пожалуйста, настройте порядок загрузки и перезапустите:" } \ No newline at end of file diff --git a/assets/locales/zhCN/terrarum.json b/assets/locales/zhCN/terrarum.json index 8b20d99d6..b46e2b197 100644 --- a/assets/locales/zhCN/terrarum.json +++ b/assets/locales/zhCN/terrarum.json @@ -24,5 +24,5 @@ "MENU_OPTIONS_PARTICLES": "微粒数", "MENU_IO_IMPORT": "匯入", "APP_NOMODULE_1": "当前未加载任何模块。", - "APP_NOMODULE_2": "请重新配置您的加载顺序:" + "APP_NOMODULE_2": "请配置您的加载顺序并重新启动:" } \ No newline at end of file diff --git a/assets/locales/zhTW/terrarum.json b/assets/locales/zhTW/terrarum.json index 847d23484..c0beb388c 100644 --- a/assets/locales/zhTW/terrarum.json +++ b/assets/locales/zhTW/terrarum.json @@ -20,5 +20,5 @@ "MENU_OPTIONS_PARTICLES": "粒子数", "MENU_IO_IMPORT": "Import", "APP_NOMODULE_1": "當前未加載任何模塊。", - "APP_NOMODULE_2": "請重新配置您的加載順序:" + "APP_NOMODULE_2": "請配置您的加載順序並重新啟動:" } \ No newline at end of file diff --git a/src/net/torvald/terrarum/NoModuleDefaultTitlescreen.kt b/src/net/torvald/terrarum/NoModuleDefaultTitlescreen.kt index 89d9f0c8c..4c371bf71 100644 --- a/src/net/torvald/terrarum/NoModuleDefaultTitlescreen.kt +++ b/src/net/torvald/terrarum/NoModuleDefaultTitlescreen.kt @@ -1,11 +1,16 @@ package net.torvald.terrarum +import com.badlogic.gdx.Gdx +import com.badlogic.gdx.Input +import com.badlogic.gdx.Input.Keys import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Pixmap import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.badlogic.gdx.graphics.glutils.FrameBuffer import net.torvald.terrarum.langpack.Lang import net.torvald.terrarum.ui.Toolkit +import java.awt.Desktop +import java.io.File /** * Created by minjaesong on 2021-12-11. @@ -21,6 +26,15 @@ class NoModuleDefaultTitlescreen(batch: FlippingSpriteBatch) : IngameInstance(ba private var init = false private val pathText = App.loadOrderDir + private val pathFile = File(App.loadOrderDir)//.parentFile + private val pathButtonW = App.fontGameFBO.getWidth(pathText) + private val pathButtonH = 20 + private var pathButtonX = 0f + private var pathButtonY = 0f + + private var gamemode = 0 + + private val fbatch = SpriteBatch() override fun render(updateRate: Float) { gdxClearAndSetBlend(0f, 0f, 0f, 0f) @@ -46,8 +60,8 @@ class NoModuleDefaultTitlescreen(batch: FlippingSpriteBatch) : IngameInstance(ba batch.color = Color.WHITE wot.reversed().forEachIndexed { index, s -> if (index == 0) { - batch.color = Toolkit.Theme.COL_HIGHLIGHT - App.fontGameFBO.draw(batch, pathText, (Toolkit.drawWidth - App.fontGameFBO.getWidth(pathText)) / 2f, heights[index] + centering) + pathButtonX = (Toolkit.drawWidth - pathButtonW) / 2f + pathButtonY = heights[index] + centering } else { batch.color = Color.WHITE @@ -58,14 +72,31 @@ class NoModuleDefaultTitlescreen(batch: FlippingSpriteBatch) : IngameInstance(ba } } - batch.inUse { - batch.color = Color.WHITE - batch.draw(fbo.colorBufferTexture, 0f, 0f) + if (gamemode == 0) { + val mouseOnLink = (Gdx.input.x.toFloat() in pathButtonX - 48..pathButtonX + 48 + pathButtonW && + App.scr.hf - Gdx.input.y in pathButtonY - 12..pathButtonY + pathButtonH + 12) + + if (mouseOnLink && Gdx.input.isButtonJustPressed(Input.Buttons.LEFT)) { + Desktop.getDesktop().open(pathFile) + } + + fbatch.inUse { + it.color = Color.WHITE + it.draw(fbo.colorBufferTexture, 0f, fbo.height.toFloat(), fbo.width.toFloat(), -fbo.height.toFloat()) + it.color = if (mouseOnLink) Toolkit.Theme.COL_HIGHLIGHT else Toolkit.Theme.COL_ACTIVE + App.fontGame.draw(it, pathText, pathButtonX, pathButtonY) + } + + if (Gdx.input.isKeyPressed(Keys.ESCAPE)) gamemode = 1 + } + else if (gamemode == 1) { + } } override fun dispose() { super.dispose() + fbatch.dispose() fbo.dispose() }