"cleanup" Screens instead of "close" since that's really what they do
parent
86a4b04332
commit
fe3ea62286
|
@ -29,6 +29,6 @@ public class ExitGameScreen extends Screen
|
|||
{}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
public void cleanup()
|
||||
{ infoText.remove(); }
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class IngameHUD extends Screen
|
|||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
public void cleanup()
|
||||
{
|
||||
debugText.remove();
|
||||
positionText.remove();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -12,5 +12,5 @@ public abstract class Screen
|
|||
|
||||
public abstract void tick();
|
||||
|
||||
public abstract void close();
|
||||
public abstract void cleanup();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue