Update gdx-teavm to 1.5.1
This commit is contained in:
@@ -27,7 +27,7 @@ allprojects {
|
|||||||
gdxControllersVersion = '2.2.4'
|
gdxControllersVersion = '2.2.4'
|
||||||
robovmVersion = '2.3.24'
|
robovmVersion = '2.3.24'
|
||||||
|
|
||||||
gdxTeaVMVersion = '1.5.0'
|
gdxTeaVMVersion = '1.5.1'
|
||||||
teaVMVersion = '0.13.0'
|
teaVMVersion = '0.13.0'
|
||||||
}
|
}
|
||||||
version = appVersionName
|
version = appVersionName
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ task modifyHtml {
|
|||||||
def faviconDest = new File(rootFS, "favicon.ico")
|
def faviconDest = new File(rootFS, "favicon.ico")
|
||||||
def sourceFavicon = file("../desktop/src/main/assets/icons/windows.ico")
|
def sourceFavicon = file("../desktop/src/main/assets/icons/windows.ico")
|
||||||
def startupLogo = new File(assetsDir, "startup-logo.png")
|
def startupLogo = new File(assetsDir, "startup-logo.png")
|
||||||
def assetsTxt = new File(assetsDir, "assets.txt")
|
def assetsTxt = new File(assetsDir, "preload.txt")
|
||||||
|
|
||||||
// delete placeholder startup-logo.png
|
// delete placeholder startup-logo.png
|
||||||
if (startupLogo.exists()) {
|
if (startupLogo.exists()) {
|
||||||
@@ -49,7 +49,7 @@ task modifyHtml {
|
|||||||
println "startup-logo.png not found in assets folder. Nothing to delete."
|
println "startup-logo.png not found in assets folder. Nothing to delete."
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove lines containing the word 'frame' (case-insensitive) from assets.txt
|
// remove lines containing the word 'frame' (case-insensitive) from preload.txt
|
||||||
if (assetsTxt.exists()) {
|
if (assetsTxt.exists()) {
|
||||||
def originalLines = assetsTxt.readLines('UTF-8')
|
def originalLines = assetsTxt.readLines('UTF-8')
|
||||||
def filteredLines = originalLines.findAll { line ->
|
def filteredLines = originalLines.findAll { line ->
|
||||||
@@ -62,12 +62,12 @@ task modifyHtml {
|
|||||||
if (i < filteredLines.size() - 1) writer.newLine()
|
if (i < filteredLines.size() - 1) writer.newLine()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println "Removed lines containing 'frame' from assets.txt."
|
println "Removed lines containing 'frame' from preload.txt."
|
||||||
} else {
|
} else {
|
||||||
println "No lines containing 'frame' found in assets.txt. No changes made."
|
println "No lines containing 'frame' found in preload.txt. No changes made."
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
println "assets.txt not found in assets folder. Skipping assets.txt cleanup."
|
println "preload.txt not found in assets folder. Skipping preload.txt cleanup."
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy windows.ico to favicon.ico
|
// copy windows.ico to favicon.ico
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Two-stage preload:
|
* Two-stage preload:
|
||||||
* - stage 1: sequentially load explicit frame list and build animation
|
* - stage 1: sequentially load explicit frame list and build animation
|
||||||
* - stage 2: preload assets.txt and show progress
|
* - stage 2: preload preload.txt and show progress
|
||||||
*/
|
*/
|
||||||
public class CustomPreloadScreen extends ApplicationAdapter {
|
public class CustomPreloadScreen extends ApplicationAdapter {
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ public class CustomPreloadScreen extends ApplicationAdapter {
|
|||||||
|
|
||||||
private void startAssetsPreload() {
|
private void startAssetsPreload() {
|
||||||
if (stage == null) setupStageMinimal();
|
if (stage == null) setupStageMinimal();
|
||||||
assetLoader.preload("assets.txt", new AssetLoaderListener<Void>() {
|
assetLoader.preload("preload.txt", new AssetLoaderListener<Void>() {
|
||||||
public void onSuccess(String url, Void result) {
|
public void onSuccess(String url, Void result) {
|
||||||
Gdx.app.postRunnable(() -> assetsInitial = Math.max(0, assetLoader.getQueue()));
|
Gdx.app.postRunnable(() -> assetsInitial = Math.max(0, assetLoader.getQueue()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user