"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
|
@Override
|
||||||
public void close()
|
public void cleanup()
|
||||||
{ infoText.remove(); }
|
{ infoText.remove(); }
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class IngameHUD extends Screen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close()
|
public void cleanup()
|
||||||
{
|
{
|
||||||
debugText.remove();
|
debugText.remove();
|
||||||
positionText.remove();
|
positionText.remove();
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class TitleScreen extends Screen
|
||||||
if (Litecraft.getInstance().getWorld() != null)
|
if (Litecraft.getInstance().getWorld() != null)
|
||||||
{
|
{
|
||||||
ginger3D.openScreen(new IngameHUD());
|
ginger3D.openScreen(new IngameHUD());
|
||||||
this.close();
|
this.cleanup();
|
||||||
}
|
}
|
||||||
//TODO: add world creation gui so it takes u to world creation place
|
//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
|
//TODO: add a texture to be rendered behind the gui as an option
|
||||||
|
@ -64,7 +64,7 @@ public class TitleScreen extends Screen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close()
|
public void cleanup()
|
||||||
{
|
{
|
||||||
this.debugText.remove();
|
this.debugText.remove();
|
||||||
this.playButton.hide(Litecraft.getInstance().data.guis);
|
this.playButton.hide(Litecraft.getInstance().data.guis);
|
||||||
|
|
|
@ -12,5 +12,5 @@ public abstract class Screen
|
||||||
|
|
||||||
public abstract void tick();
|
public abstract void tick();
|
||||||
|
|
||||||
public abstract void close();
|
public abstract void cleanup();
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class GingerGL
|
||||||
|
|
||||||
public void openScreen(Screen screen)
|
public void openScreen(Screen screen)
|
||||||
{
|
{
|
||||||
if (registry.currentScreen != null) registry.currentScreen.close();
|
if (registry.currentScreen != null) registry.currentScreen.cleanup();
|
||||||
registry.currentScreen = screen;
|
registry.currentScreen = screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue