Fixed editor not showing after second view

This commit is contained in:
Anuken
2019-08-01 11:26:28 -04:00
parent 69ee5257f2
commit b1980a17ac
5 changed files with 10 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 KiB

After

Width:  |  Height:  |  Size: 677 KiB

View File

@@ -335,7 +335,12 @@ public class MapEditorDialog extends Dialog implements Disposable{
@Override
public Dialog show(){
return super.show(Core.scene, Actions.sequence());
return super.show(Core.scene, Actions.sequence(Actions.alpha(1f)));
}
@Override
public void hide(){
super.hide(Actions.sequence(Actions.alpha(0f)));
}
@Override

View File

@@ -240,10 +240,6 @@ public class MapView extends Element implements GestureListener{
editor.renderer().draw(centerx - sclwidth / 2, centery - sclheight / 2, sclwidth, sclheight);
Draw.reset();
if(!ScissorStack.pushScissors(rect.set(x, y, width, height))){
return;
}
if(grid){
Draw.color(Color.GRAY);
image.setBounds(centerx - sclwidth / 2, centery - sclheight / 2, sclwidth, sclheight);
@@ -303,7 +299,6 @@ public class MapView extends Element implements GestureListener{
Draw.reset();
ScissorStack.popScissors();
ScissorStack.popScissors();
}
private boolean active(){

View File

@@ -1,6 +1,7 @@
package io.anuke.mindustry.ui.fragments;
import io.anuke.arc.scene.Group;
import io.anuke.arc.scene.actions.*;
import io.anuke.arc.scene.event.Touchable;
import io.anuke.arc.scene.ui.Label;
import io.anuke.arc.scene.ui.TextButton;
@@ -44,11 +45,12 @@ public class LoadingFragment extends Fragment{
public void show(String text){
table.<Label>find("namelabel").setText(text);
table.visible(true);
table.getColor().a = 1f;
table.toFront();
}
public void hide(){
table.visible(false);
button.visible(false);
table.toFront();
table.actions(Actions.fadeOut(1f), Actions.visible(false));
}
}