From b47e23c0fe884b900efc8de286104f6d350eee50 Mon Sep 17 00:00:00 2001 From: creeper Date: Sun, 25 Aug 2024 17:07:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E8=BF=87=E6=B8=85=E5=B1=8F?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9C=80=E5=A4=A7=E5=8C=96=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E6=9C=89=E6=AE=8B=E5=BD=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/github/creeper12356/screen/BasicMenuScreen.java | 10 ++++------ .../java/io/github/creeper12356/utils/Resource.java | 2 +- gradle.properties | 2 +- .../io/github/creeper12356/lwjgl3/Lwjgl3Launcher.java | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/io/github/creeper12356/screen/BasicMenuScreen.java b/core/src/main/java/io/github/creeper12356/screen/BasicMenuScreen.java index f265c1c..a0213f1 100644 --- a/core/src/main/java/io/github/creeper12356/screen/BasicMenuScreen.java +++ b/core/src/main/java/io/github/creeper12356/screen/BasicMenuScreen.java @@ -36,8 +36,7 @@ public BasicMenuScreen(MyGame myGame, boolean okVisible, boolean cancelVisible) this.myGame = myGame; camera = new OrthographicCamera(); - viewport = new FitViewport(Resource.totalWidth, Resource.totalHeight); - viewport.apply(); + viewport = new FitViewport(Resource.totalWidth, Resource.totalHeight, camera); stage = new Stage(viewport); @@ -85,16 +84,15 @@ public void show() { @Override public void render(float delta) { + Gdx.gl.glClearColor(0, 0, 0, 1); + Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); stage.act(delta); stage.draw(); } @Override public void resize(int width, int height) { - viewport.update(width, height); - - Gdx.gl.glClearColor(0, 0, 0, 1); - Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); + viewport.update(width, height, true); } @Override diff --git a/core/src/main/java/io/github/creeper12356/utils/Resource.java b/core/src/main/java/io/github/creeper12356/utils/Resource.java index 7df0d87..3e1aea4 100644 --- a/core/src/main/java/io/github/creeper12356/utils/Resource.java +++ b/core/src/main/java/io/github/creeper12356/utils/Resource.java @@ -754,7 +754,7 @@ public static byte[] loadData(String filename) { // pointMgr = new PointMgr(); // aniTalkButton = new Animation(); - language = "en"; + language = "zh"; // 启动游戏时加载 Resource.loadGame(); diff --git a/gradle.properties b/gradle.properties index 1af929e..1e85e4e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ org.gradle.configureondemand=false graalHelperVersion=2.0.1 enableGraalNative=false gdxVersion=1.12.1 -projectVersion=1.0.0 +projectVersion=1.0.1 diff --git a/lwjgl3/src/main/java/io/github/creeper12356/lwjgl3/Lwjgl3Launcher.java b/lwjgl3/src/main/java/io/github/creeper12356/lwjgl3/Lwjgl3Launcher.java index 9c504cc..3b84f2f 100644 --- a/lwjgl3/src/main/java/io/github/creeper12356/lwjgl3/Lwjgl3Launcher.java +++ b/lwjgl3/src/main/java/io/github/creeper12356/lwjgl3/Lwjgl3Launcher.java @@ -1,8 +1,8 @@ package io.github.creeper12356.lwjgl3; -import com.badlogic.gdx.Gdx; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; + import io.github.creeper12356.MyGame; /** Launches the desktop (LWJGL3) application. */