mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
update TransitionScreen
This commit is contained in:
@@ -33,6 +33,7 @@ public class TransitionScreen extends FContainer {
|
|||||||
private String message = "";
|
private String message = "";
|
||||||
boolean matchTransition, isloading, isIntro, isFadeMusic, isArenaScene;
|
boolean matchTransition, isloading, isIntro, isFadeMusic, isArenaScene;
|
||||||
GlyphLayout layout;
|
GlyphLayout layout;
|
||||||
|
BitmapFont font;
|
||||||
public TransitionScreen(Runnable proc, TextureRegion screen, boolean enterMatch, boolean loading) {
|
public TransitionScreen(Runnable proc, TextureRegion screen, boolean enterMatch, boolean loading) {
|
||||||
this(proc, screen, enterMatch, loading, false, false);
|
this(proc, screen, enterMatch, loading, false, false);
|
||||||
}
|
}
|
||||||
@@ -51,6 +52,14 @@ public class TransitionScreen extends FContainer {
|
|||||||
runnable = proc;
|
runnable = proc;
|
||||||
textureRegion = screen;
|
textureRegion = screen;
|
||||||
matchTransition = enterMatch;
|
matchTransition = enterMatch;
|
||||||
|
if (matchTransition) {
|
||||||
|
float fontScale = GuiBase.isAndroid() ? 14f : 10f;
|
||||||
|
float screenW = Forge.isLandscapeMode() ? Forge.getScreenWidth() : Forge.getScreenHeight();
|
||||||
|
float screenH = Forge.isLandscapeMode() ? Forge.getScreenHeight() : Forge.getScreenWidth();
|
||||||
|
font = Controls.getBitmapFont("default", fontScale/(screenW/screenH));
|
||||||
|
} else {
|
||||||
|
font = Controls.getBitmapFont("default");
|
||||||
|
}
|
||||||
isloading = loading;
|
isloading = loading;
|
||||||
isIntro = intro;
|
isIntro = intro;
|
||||||
isFadeMusic = fadeMusic;
|
isFadeMusic = fadeMusic;
|
||||||
@@ -83,6 +92,7 @@ public class TransitionScreen extends FContainer {
|
|||||||
}
|
}
|
||||||
public void disableMatchTransition() {
|
public void disableMatchTransition() {
|
||||||
matchTransition = false;
|
matchTransition = false;
|
||||||
|
Controls.getBitmapFont("default");
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BGAnimation extends ForgeAnimation {
|
private class BGAnimation extends ForgeAnimation {
|
||||||
@@ -145,8 +155,7 @@ public class TransitionScreen extends FContainer {
|
|||||||
float centerY = screenH/2;
|
float centerY = screenH/2;
|
||||||
TextureRegion enemyAvatar = Config.instance().getAtlas(enemyAtlasPath).createSprite("Avatar");
|
TextureRegion enemyAvatar = Config.instance().getAtlas(enemyAtlasPath).createSprite("Avatar");
|
||||||
enemyAvatar.flip(true, false);
|
enemyAvatar.flip(true, false);
|
||||||
float fontScale = GuiBase.isAndroid() ? 14f : 10f;
|
|
||||||
BitmapFont font = Controls.getBitmapFont("default", fontScale/(screenW/screenH));
|
|
||||||
if (textureRegion != null) {
|
if (textureRegion != null) {
|
||||||
if (isArenaScene)
|
if (isArenaScene)
|
||||||
g.drawImage(screenUIBackground, 0, 0, Forge.getScreenWidth(), Forge.getScreenHeight());
|
g.drawImage(screenUIBackground, 0, 0, Forge.getScreenWidth(), Forge.getScreenHeight());
|
||||||
|
|||||||
Reference in New Issue
Block a user