Always call close on the old screen before opening a new one!
parent
1787ea0242
commit
cfbdab79c7
|
@ -43,5 +43,4 @@ public class IngameHUD extends Screen
|
|||
debugText.remove();
|
||||
positionText.remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,10 @@ public class Ginger
|
|||
}
|
||||
|
||||
public void openScreen(Screen screen)
|
||||
{ gingerRegister.currentScreen = screen; }
|
||||
{
|
||||
if (gingerRegister.currentScreen != null) gingerRegister.currentScreen.close();
|
||||
gingerRegister.currentScreen = screen;
|
||||
}
|
||||
|
||||
public void setGingerPlayer(Player player)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue