Resize Android even more, fixing crash when changing languages on Android
This commit is contained in:
parent
5cbe7a345e
commit
a11c4614ea
2
.gitignore
vendored
2
.gitignore
vendored
@ -409,7 +409,7 @@ web_resources/
|
||||
pc_resources/
|
||||
resources_hd/
|
||||
web_resources_x2/
|
||||
|
||||
android_resources/
|
||||
|
||||
.artifacts/
|
||||
|
||||
|
||||
@ -38,7 +38,8 @@ EXCEPTIONS = {
|
||||
"w/star_red.png",
|
||||
"w/white.png",
|
||||
"w/ui/img/main/aboutPage003android.png",
|
||||
"w/ui_en/img/main/aboutPage003android.png"
|
||||
"w/ui_en/img/main/aboutPage003android.png",
|
||||
"w/exterior/texAtlas002.png",
|
||||
}
|
||||
|
||||
# Path prefixes (relative to resources root, forward-slash) that get 8x reduction.
|
||||
@ -63,10 +64,10 @@ def _resize_factor(rel: str) -> int:
|
||||
norm = rel.replace("\\", "/")
|
||||
for prefix in HIGH_REDUCTION_PREFIXES:
|
||||
if norm.startswith(prefix):
|
||||
return 4
|
||||
return 8
|
||||
for prefix in LOW_REDUCTION_POSTFIXES:
|
||||
if norm.endswith(prefix):
|
||||
return 1
|
||||
return 2
|
||||
return 4
|
||||
|
||||
|
||||
@ -120,8 +121,8 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Optimize PNG images for web build")
|
||||
parser.add_argument("--src", default="resources",
|
||||
help="Source resources directory (default: resources)")
|
||||
parser.add_argument("--dst", default="web_resources",
|
||||
parser.add_argument("--dst", default="android_resources",
|
||||
help="Destination parent directory; will contain a 'resources' subdir "
|
||||
"(default: web_resources)")
|
||||
"(default: android_resources)")
|
||||
args = parser.parse_args()
|
||||
optimize(args.src, args.dst)
|
||||
|
||||
@ -15,8 +15,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 37
|
||||
versionCode 3
|
||||
versionName "1.0.6"
|
||||
versionCode 4
|
||||
versionName "1.0.7"
|
||||
externalNativeBuild {
|
||||
/*ndkBuild {
|
||||
arguments "APP_PLATFORM=android-19"
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
"y": 10,
|
||||
"width": 160,
|
||||
"height": 36,
|
||||
"text": "v. 1.0.6",
|
||||
"text": "v. 1.0.7",
|
||||
"fontSize": 24,
|
||||
"textCentered": false,
|
||||
"topAligned": true,
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
"y": 10,
|
||||
"width": 160,
|
||||
"height": 36,
|
||||
"text": "v. 1.0.6",
|
||||
"text": "v. 1.0.7",
|
||||
"fontSize": 24,
|
||||
"textCentered": false,
|
||||
"topAligned": true,
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
"y": 10,
|
||||
"width": 160,
|
||||
"height": 36,
|
||||
"text": "v. 1.0.6",
|
||||
"text": "v. 1.0.7",
|
||||
"fontSize": 24,
|
||||
"textCentered": false,
|
||||
"topAligned": true,
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
"y": 10,
|
||||
"width": 160,
|
||||
"height": 36,
|
||||
"text": "v. 1.0.6",
|
||||
"text": "v. 1.0.7",
|
||||
"fontSize": 24,
|
||||
"textCentered": false,
|
||||
"topAligned": true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user