simplified a structure of UIs a bit

This commit is contained in:
minjaesong
2017-07-16 23:15:32 +09:00
parent 942971f456
commit 485cbe1206
29 changed files with 321 additions and 371 deletions

View File

@@ -150,10 +150,21 @@ object Terrarum : Game() {
private val localeSimple = arrayOf("de", "en", "es", "it")
var gameLocale = "lateinit"
set(value) {
if (localeSimple.contains(value.substring(0..1)))
field = value.substring(0..1)
else
field = value
if (value.isBlank() || value.isEmpty()) {
field = sysLang
}
else {
try {
if (localeSimple.contains(value.substring(0..1)))
field = value.substring(0..1)
else
field = value
}
catch (e: StringIndexOutOfBoundsException) {
field = value
}
}
fontGame.reload(value)
}