mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Custom desktop font (#6377)
* Custom desktop font * Add `getDesktopAllFonts` to setting custom desktop font. * Custom font. `desktopFontFamily` change to `fontFamily`. Add GameSettings.getSettingsForPlatformLaunchers(). * Add `Custom font` setting UI. * Add `Custom font` on Android. * `Default Font` use translations. * format * remove open fun. Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
This commit is contained in:
@ -11,6 +11,7 @@ import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.UncivGameParameters
|
||||
import com.unciv.logic.GameSaver
|
||||
import com.unciv.models.metadata.GameSettings
|
||||
import com.unciv.ui.utils.Fonts
|
||||
import java.io.File
|
||||
|
||||
@ -34,12 +35,15 @@ open class AndroidLauncher : AndroidApplication() {
|
||||
val config = AndroidApplicationConfiguration().apply {
|
||||
useImmersiveMode = true;
|
||||
}
|
||||
|
||||
val fontFamily = GameSettings.getSettingsForPlatformLaunchers(filesDir.path).fontFamily
|
||||
|
||||
val androidParameters = UncivGameParameters(
|
||||
version = BuildConfig.VERSION_NAME,
|
||||
crashReportSysInfo = CrashReportSysInfoAndroid,
|
||||
fontImplementation = NativeFontAndroid(Fonts.ORIGINAL_FONT_SIZE.toInt()),
|
||||
customSaveLocationHelper = customSaveLocationHelper,
|
||||
limitOrientationsHelper = limitOrientationsHelper
|
||||
version = BuildConfig.VERSION_NAME,
|
||||
crashReportSysInfo = CrashReportSysInfoAndroid,
|
||||
fontImplementation = NativeFontAndroid(Fonts.ORIGINAL_FONT_SIZE.toInt(), fontFamily),
|
||||
customSaveLocationHelper = customSaveLocationHelper,
|
||||
limitOrientationsHelper = limitOrientationsHelper
|
||||
)
|
||||
|
||||
game = UncivGame(androidParameters)
|
||||
|
Reference in New Issue
Block a user