mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 13:18:56 +07:00
added cutout support (#7044)
* added support * now toggleable in settings * translation * added note that it requires restart * made it enabled by default * padded buttons to the right if there is a cutout * checking for cutout instead of android * reverted button changes * moved option to advancedTab
This commit is contained in:
@ -55,6 +55,8 @@ class GameSettings {
|
||||
var useDemographics: Boolean = false
|
||||
var showZoomButtons: Boolean = false
|
||||
|
||||
var androidCutout: Boolean = false
|
||||
|
||||
var multiplayer = GameSettingsMultiplayer()
|
||||
|
||||
var showExperimentalWorldWrap = false // We're keeping this as a config due to ANR problems on Android phones for people who don't know what they're doing :/
|
||||
|
@ -47,6 +47,9 @@ fun advancedTab(
|
||||
settings.showExperimentalWorldWrap = it
|
||||
}
|
||||
|
||||
if (UncivGame.Current.platformSpecificHelper?.hasDisplayCutout() == true)
|
||||
optionsPopup.addCheckbox(this, "Enable display cutout (requires restart)", settings.androidCutout, false) { settings.androidCutout = it }
|
||||
|
||||
addMaxZoomSlider(this, settings)
|
||||
|
||||
val helper = UncivGame.Current.platformSpecificHelper
|
||||
|
@ -16,6 +16,9 @@ interface GeneralPlatformSpecificHelpers {
|
||||
*/
|
||||
fun allowPortrait(allow: Boolean) {}
|
||||
|
||||
fun hasDisplayCutout(): Boolean { return false }
|
||||
fun toggleDisplayCutout(androidCutout: Boolean) {}
|
||||
|
||||
/**
|
||||
* Notifies the user that it's their turn while the game is running
|
||||
*/
|
||||
|
Reference in New Issue
Block a user