mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-28 13:48:49 +07:00
small fixes (#7181)
* fixes * relaced translations with _ * better displayCutout
This commit is contained in:
@ -35,12 +35,15 @@ Sources for Info about current orientation in case need:
|
|||||||
if (activity.requestedOrientation != orientation) activity.requestedOrientation = orientation
|
if (activity.requestedOrientation != orientation) activity.requestedOrientation = orientation
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hasDisplayCutout(): Boolean {
|
override fun hasDisplayCutout() = when {
|
||||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.R ->
|
||||||
|
activity.display?.cutout != null
|
||||||
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ->
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
activity.windowManager.defaultDisplay.cutout != null
|
activity.windowManager.defaultDisplay.cutout != null
|
||||||
} else {
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P ->
|
||||||
false
|
activity.window.decorView.rootWindowInsets.displayCutout != null
|
||||||
}
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toggleDisplayCutout(androidCutout: Boolean) {
|
override fun toggleDisplayCutout(androidCutout: Boolean) {
|
||||||
|
@ -50,7 +50,6 @@ class PlayerPickerTable(
|
|||||||
): Table() {
|
): Table() {
|
||||||
val playerListTable = Table()
|
val playerListTable = Table()
|
||||||
val civBlocksWidth = if(blockWidth <= 10f) previousScreen.stage.width / 3 - 5f else blockWidth
|
val civBlocksWidth = if(blockWidth <= 10f) previousScreen.stage.width / 3 - 5f else blockWidth
|
||||||
val friendsBlocksWidth = if(blockWidth <= 10f) previousScreen.stage.width / 5 - 5f else blockWidth / 2
|
|
||||||
|
|
||||||
/** Locks player table for editing, currently unused, was previously used for scenarios and could be useful in the future.*/
|
/** Locks player table for editing, currently unused, was previously used for scenarios and could be useful in the future.*/
|
||||||
var locked = false
|
var locked = false
|
||||||
|
@ -171,7 +171,7 @@ class TranslationTests {
|
|||||||
|
|
||||||
var allWordsTranslatedCorrectly = true
|
var allWordsTranslatedCorrectly = true
|
||||||
for (translationEntry in translations.values) {
|
for (translationEntry in translations.values) {
|
||||||
for ((language, translation) in translationEntry) {
|
for ((language, _) in translationEntry) {
|
||||||
UncivGame.Current.settings.language = language
|
UncivGame.Current.settings.language = language
|
||||||
try {
|
try {
|
||||||
translationEntry.entry.tr()
|
translationEntry.entry.tr()
|
||||||
|
Reference in New Issue
Block a user