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/
|
pc_resources/
|
||||||
resources_hd/
|
resources_hd/
|
||||||
web_resources_x2/
|
web_resources_x2/
|
||||||
|
android_resources/
|
||||||
|
|
||||||
.artifacts/
|
.artifacts/
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,8 @@ EXCEPTIONS = {
|
|||||||
"w/star_red.png",
|
"w/star_red.png",
|
||||||
"w/white.png",
|
"w/white.png",
|
||||||
"w/ui/img/main/aboutPage003android.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.
|
# 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("\\", "/")
|
norm = rel.replace("\\", "/")
|
||||||
for prefix in HIGH_REDUCTION_PREFIXES:
|
for prefix in HIGH_REDUCTION_PREFIXES:
|
||||||
if norm.startswith(prefix):
|
if norm.startswith(prefix):
|
||||||
return 4
|
return 8
|
||||||
for prefix in LOW_REDUCTION_POSTFIXES:
|
for prefix in LOW_REDUCTION_POSTFIXES:
|
||||||
if norm.endswith(prefix):
|
if norm.endswith(prefix):
|
||||||
return 1
|
return 2
|
||||||
return 4
|
return 4
|
||||||
|
|
||||||
|
|
||||||
@ -120,8 +121,8 @@ if __name__ == "__main__":
|
|||||||
parser = argparse.ArgumentParser(description="Optimize PNG images for web build")
|
parser = argparse.ArgumentParser(description="Optimize PNG images for web build")
|
||||||
parser.add_argument("--src", default="resources",
|
parser.add_argument("--src", default="resources",
|
||||||
help="Source resources directory (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 "
|
help="Destination parent directory; will contain a 'resources' subdir "
|
||||||
"(default: web_resources)")
|
"(default: android_resources)")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
optimize(args.src, args.dst)
|
optimize(args.src, args.dst)
|
||||||
|
|||||||
@ -15,8 +15,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 37
|
targetSdkVersion 37
|
||||||
versionCode 3
|
versionCode 4
|
||||||
versionName "1.0.6"
|
versionName "1.0.7"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
/*ndkBuild {
|
/*ndkBuild {
|
||||||
arguments "APP_PLATFORM=android-19"
|
arguments "APP_PLATFORM=android-19"
|
||||||
|
|||||||
@ -125,7 +125,7 @@
|
|||||||
"y": 10,
|
"y": 10,
|
||||||
"width": 160,
|
"width": 160,
|
||||||
"height": 36,
|
"height": 36,
|
||||||
"text": "v. 1.0.6",
|
"text": "v. 1.0.7",
|
||||||
"fontSize": 24,
|
"fontSize": 24,
|
||||||
"textCentered": false,
|
"textCentered": false,
|
||||||
"topAligned": true,
|
"topAligned": true,
|
||||||
|
|||||||
@ -116,7 +116,7 @@
|
|||||||
"y": 10,
|
"y": 10,
|
||||||
"width": 160,
|
"width": 160,
|
||||||
"height": 36,
|
"height": 36,
|
||||||
"text": "v. 1.0.6",
|
"text": "v. 1.0.7",
|
||||||
"fontSize": 24,
|
"fontSize": 24,
|
||||||
"textCentered": false,
|
"textCentered": false,
|
||||||
"topAligned": true,
|
"topAligned": true,
|
||||||
|
|||||||
@ -125,7 +125,7 @@
|
|||||||
"y": 10,
|
"y": 10,
|
||||||
"width": 160,
|
"width": 160,
|
||||||
"height": 36,
|
"height": 36,
|
||||||
"text": "v. 1.0.6",
|
"text": "v. 1.0.7",
|
||||||
"fontSize": 24,
|
"fontSize": 24,
|
||||||
"textCentered": false,
|
"textCentered": false,
|
||||||
"topAligned": true,
|
"topAligned": true,
|
||||||
|
|||||||
@ -125,7 +125,7 @@
|
|||||||
"y": 10,
|
"y": 10,
|
||||||
"width": 160,
|
"width": 160,
|
||||||
"height": 36,
|
"height": 36,
|
||||||
"text": "v. 1.0.6",
|
"text": "v. 1.0.7",
|
||||||
"fontSize": 24,
|
"fontSize": 24,
|
||||||
"textCentered": false,
|
"textCentered": false,
|
||||||
"topAligned": true,
|
"topAligned": true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user