|
|
@@ -10,14 +10,13 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
|
|
|
== Implementing Multiple Screens
|
|
|
|
|
|
-So, before I explain how to do this, ask yourself a question:+
|
|
|
-+
|
|
|
-Why the F do I need Multiple Screens?!??+
|
|
|
-+
|
|
|
-This is JME! That's what AppStates are for.+
|
|
|
-+
|
|
|
-Now… on with the example of how to implement multiple screens using AppStates.+
|
|
|
-+
|
|
|
+So, before I explain how to do this, ask yourself a question:
|
|
|
+
|
|
|
+Why the F do I need Multiple Screens?!??
|
|
|
+
|
|
|
+This is JME! That's what AppStates are for.
|
|
|
+
|
|
|
+Now… on with the example of how to implement multiple screens using AppStates.
|
|
|
|
|
|
[source,java]
|
|
|
----
|
|
|
@@ -68,8 +67,8 @@ public class UserLogin extends AbstractAppState {
|
|
|
|
|
|
----
|
|
|
|
|
|
-And Ker-pow! You have a screen without a new Screen.+
|
|
|
-+
|
|
|
+And Ker-pow! You have a screen without a new Screen.
|
|
|
+
|
|
|
If you want to be fancy about loading and unloading the contents of the screen, use the EffectManager and call the following when running the effects from the cleanup() method of the AppState.
|
|
|
|
|
|
[source,java]
|