mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 13:49:54 +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
|
||||
}
|
||||
|
||||
override fun hasDisplayCutout(): Boolean {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
override fun hasDisplayCutout() = when {
|
||||
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
|
||||
} else {
|
||||
false
|
||||
}
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P ->
|
||||
activity.window.decorView.rootWindowInsets.displayCutout != null
|
||||
else -> false
|
||||
}
|
||||
|
||||
override fun toggleDisplayCutout(androidCutout: Boolean) {
|
||||
|
@ -50,7 +50,6 @@ class PlayerPickerTable(
|
||||
): Table() {
|
||||
val playerListTable = Table()
|
||||
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.*/
|
||||
var locked = false
|
||||
|
@ -171,7 +171,7 @@ class TranslationTests {
|
||||
|
||||
var allWordsTranslatedCorrectly = true
|
||||
for (translationEntry in translations.values) {
|
||||
for ((language, translation) in translationEntry) {
|
||||
for ((language, _) in translationEntry) {
|
||||
UncivGame.Current.settings.language = language
|
||||
try {
|
||||
translationEntry.entry.tr()
|
||||
|
Reference in New Issue
Block a user