Package tripleplay.game
Class ScreenStack.Screen
java.lang.Object
tripleplay.game.ScreenStack.Screen
- Direct Known Subclasses:
ScreenStack.UIScreen
- Enclosing class:
ScreenStack
Displays and manages the lifecycle for a single game screen.
-
Field Summary
Modifier and TypeFieldDescriptionfinal GroupLayer
The layer on which all of this screen's UI must be placed.final react.Signal<Clock>
A signal emitted on every frame, while this screen is showing.final react.Signal<Clock>
A signal emitted on every simulation update, while this screen is showing. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Addsac
to a set to be closed when this screen is hidden.game()
Returns a reference to the game in which this screen is operating.void
Called when this screen's transition out of view has started.void
Called when this screen's transition into view has completed.pythagoras.f.IDimension
size()
Returns the size of this screen.react.ValueView<pythagoras.f.IDimension>
The size of this screen as a reactive value.void
wasAdded()
Called when a screen is added to the screen stack for the first time.void
Called when a screen is no longer the top screen (having either been pushed down by another screen, or popped off the stack).void
Called when a screen has been removed from the stack.void
wasShown()
Called when a screen becomes the top screen, and is therefore made visible.
-
Field Details
-
layer
The layer on which all of this screen's UI must be placed. -
update
A signal emitted on every simulation update, while this screen is showing. -
paint
A signal emitted on every frame, while this screen is showing.
-
-
Method Details
-
game
Returns a reference to the game in which this screen is operating. -
size
public pythagoras.f.IDimension size()Returns the size of this screen. This is used for transitions. Defaults to the size of the entire view. -
sizeValue
public react.ValueView<pythagoras.f.IDimension> sizeValue()The size of this screen as a reactive value. Listeners are notified when the screen size changes. -
wasAdded
public void wasAdded()Called when a screen is added to the screen stack for the first time. -
wasShown
public void wasShown()Called when a screen becomes the top screen, and is therefore made visible. -
wasHidden
public void wasHidden()Called when a screen is no longer the top screen (having either been pushed down by another screen, or popped off the stack). -
wasRemoved
public void wasRemoved()Called when a screen has been removed from the stack. This will always be preceeded by a call towasHidden()
, though not always immediately. -
showTransitionCompleted
public void showTransitionCompleted()Called when this screen's transition into view has completed.wasShown()
is called immediately before the transition begins, and this method is called when it ends. -
hideTransitionStarted
public void hideTransitionStarted()Called when this screen's transition out of view has started.wasHidden()
is called when the hide transition completes. -
closeOnHide
Addsac
to a set to be closed when this screen is hidden.
-