mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Fixed silly regex bug which works differently on desktop and android
This commit is contained in:
parent
7c26daaed2
commit
3f87cfa3db
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.game"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 86
|
||||
versionName "2.5.2"
|
||||
versionCode 87
|
||||
versionName "2.5.3"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -32,7 +32,7 @@ class GameSettings : LinkedHashMap<String, String>() {
|
||||
var resolution:String
|
||||
get() {
|
||||
if(this.containsKey("Resolution")) return get("Resolution")!!
|
||||
else return "900x600"
|
||||
else return "1050x700"
|
||||
}
|
||||
set(value) {
|
||||
this["Resolution"]=value
|
||||
|
@ -130,8 +130,7 @@ fun Actor.center(parent:Stage){ centerX(parent); centerY(parent)}
|
||||
fun Label.setFontColor(color:Color): Label {style=Label.LabelStyle(style).apply { fontColor=color }; return this}
|
||||
fun String.tr(): String {
|
||||
if(contains("{")){ // sentence
|
||||
var toReturn = this
|
||||
return Regex("\\{(.*?)}").replace(this,{matchResult -> matchResult.groups[1]!!.value.tr() })
|
||||
return Regex("\\{(.*?)\\}").replace(this,{matchResult -> matchResult.groups[1]!!.value.tr() })
|
||||
}
|
||||
else return GameBasics.Translations.get(this,UnCivGame.Current.settings.language) // single word
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class WorldScreenDisplayOptionsTable() : OptionsTable(){
|
||||
|
||||
val resolutionSelectBox= SelectBox<String>(CameraStageBaseScreen.skin)
|
||||
val resolutionArray = com.badlogic.gdx.utils.Array<String>()
|
||||
resolutionArray.addAll("900x600","1200x800","1500x1000")
|
||||
resolutionArray.addAll("900x600","1050x700","1200x800","1500x1000")
|
||||
resolutionSelectBox.setItems(resolutionArray)
|
||||
resolutionSelectBox.selected = UnCivGame.Current.settings.resolution
|
||||
add(resolutionSelectBox).pad(10f).row()
|
||||
|
Loading…
Reference in New Issue
Block a user