v2.5.0: fixed loading scene visual errors when loading is slow
This commit is contained in:
+8
-8
@@ -291,6 +291,7 @@ public class InterlevelScene extends PixelScene {
|
|||||||
};
|
};
|
||||||
btnContinue.icon(Icons.STAIRS.get());
|
btnContinue.icon(Icons.STAIRS.get());
|
||||||
btnContinue.setSize(btnContinue.reqWidth()+10, 22);
|
btnContinue.setSize(btnContinue.reqWidth()+10, 22);
|
||||||
|
btnContinue.visible = false;
|
||||||
btnContinue.enable(false);
|
btnContinue.enable(false);
|
||||||
|
|
||||||
KeyEvent.addKeyListener(new Signal.Listener<KeyEvent>() {
|
KeyEvent.addKeyListener(new Signal.Listener<KeyEvent>() {
|
||||||
@@ -330,6 +331,9 @@ public class InterlevelScene extends PixelScene {
|
|||||||
btnHideStory = new IconButton(Icons.CHEVRON.get()){
|
btnHideStory = new IconButton(Icons.CHEVRON.get()){
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
|
if (btnContinue.alpha() != 0 && btnContinue.alpha() != 1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (icon.visible) {
|
if (icon.visible) {
|
||||||
enable(false);
|
enable(false);
|
||||||
//button is effectively screen-sized, but invisible
|
//button is effectively screen-sized, but invisible
|
||||||
@@ -520,13 +524,7 @@ public class InterlevelScene extends PixelScene {
|
|||||||
|
|
||||||
if (btnContinue.alpha() == 1){
|
if (btnContinue.alpha() == 1){
|
||||||
textFadingIn = false;
|
textFadingIn = false;
|
||||||
|
btnHideStory.enable(true);
|
||||||
if (btnContinue.active) {
|
|
||||||
btnHideStory.enable(true);
|
|
||||||
} else {
|
|
||||||
//move to fade out automatically
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -592,8 +590,10 @@ public class InterlevelScene extends PixelScene {
|
|||||||
|
|
||||||
private void afterLoading(){
|
private void afterLoading(){
|
||||||
if (btnContinue != null){
|
if (btnContinue != null){
|
||||||
|
btnContinue.visible = true;
|
||||||
|
float alpha = btnContinue.alpha();
|
||||||
btnContinue.enable(true);
|
btnContinue.enable(true);
|
||||||
btnContinue.alpha(0);
|
btnContinue.alpha(alpha);
|
||||||
phase = Phase.STATIC;
|
phase = Phase.STATIC;
|
||||||
} else {
|
} else {
|
||||||
phase = Phase.FADE_OUT;
|
phase = Phase.FADE_OUT;
|
||||||
|
|||||||
Reference in New Issue
Block a user