"cleanup" Screens instead of "close" since that's really what they do

pull/12/head
Caroline Bell 2020-03-02 02:13:46 -08:00
parent 86a4b04332
commit fe3ea62286
5 changed files with 6 additions and 6 deletions

View File

@ -29,6 +29,6 @@ public class ExitGameScreen extends Screen
{}
@Override
public void close()
public void cleanup()
{ infoText.remove(); }
}

View File

@ -43,7 +43,7 @@ public class IngameHUD extends Screen
}
@Override
public void close()
public void cleanup()
{
debugText.remove();
positionText.remove();

View File

@ -56,7 +56,7 @@ public class TitleScreen extends Screen
if (Litecraft.getInstance().getWorld() != null)
{
ginger3D.openScreen(new IngameHUD());
this.close();
this.cleanup();
}
//TODO: add world creation gui so it takes u to world creation place
//TODO: add a texture to be rendered behind the gui as an option
@ -64,7 +64,7 @@ public class TitleScreen extends Screen
}
@Override
public void close()
public void cleanup()
{
this.debugText.remove();
this.playButton.hide(Litecraft.getInstance().data.guis);

View File

@ -12,5 +12,5 @@ public abstract class Screen
public abstract void tick();
public abstract void close();
public abstract void cleanup();
}

View File

@ -47,7 +47,7 @@ public class GingerGL
public void openScreen(Screen screen)
{
if (registry.currentScreen != null) registry.currentScreen.close();
if (registry.currentScreen != null) registry.currentScreen.cleanup();
registry.currentScreen = screen;
}