From 3f87cfa3dbc99c608c8206dfe5e060452fbe29a4 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 19 Jun 2018 20:01:49 +0300 Subject: [PATCH] Fixed silly regex bug which works differently on desktop and android --- android/build.gradle | 4 ++-- core/src/com/unciv/ui/GameSettings.kt | 2 +- core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt | 3 +-- .../optionstable/WorldScreenDisplayOptionsTable.kt | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 66944e1459..a89a8ec579 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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 { diff --git a/core/src/com/unciv/ui/GameSettings.kt b/core/src/com/unciv/ui/GameSettings.kt index 3719da3ab6..383d7f4139 100644 --- a/core/src/com/unciv/ui/GameSettings.kt +++ b/core/src/com/unciv/ui/GameSettings.kt @@ -32,7 +32,7 @@ class GameSettings : LinkedHashMap() { var resolution:String get() { if(this.containsKey("Resolution")) return get("Resolution")!! - else return "900x600" + else return "1050x700" } set(value) { this["Resolution"]=value diff --git a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt index 9aeb280967..4be5629418 100644 --- a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt +++ b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt @@ -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 } diff --git a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenDisplayOptionsTable.kt b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenDisplayOptionsTable.kt index dfa4d783fb..06b01ba8fe 100644 --- a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenDisplayOptionsTable.kt +++ b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenDisplayOptionsTable.kt @@ -44,7 +44,7 @@ class WorldScreenDisplayOptionsTable() : OptionsTable(){ val resolutionSelectBox= SelectBox(CameraStageBaseScreen.skin) val resolutionArray = com.badlogic.gdx.utils.Array() - 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()