Add `onScreenOpened` lifecycle method to `CoreScreenLayer`.
This closes  The new lifecycle method is called both when the
screen is first opened (as the existing `onOpened`), as well as when a
screen that's already open is made visible again (as `onShow`).
@@ -78,6 +78,17 @@ public void setContents(UIWidget contents) {
@Override
public void onOpened() {
animationSystem.triggerFromPrev();
+ onScreenOpened();
+ }
+
+ /**
+ * Lifecycle method called when this screen is displayed under any circumstance.
+ * <p>
+ * This differs from {@link #onOpened} and {@link #onShow} in that it is called both when the
+ * screen is first opened (as {@code onOpened}) as well as when a screen previously opened
+ * (e.g., a parent menu in the menu system) is returned to (as {@code onShow}).
+ */
+ public void onScreenOpened() {
}
@Override
@@ -129,6 +140,7 @@ public void onClosed() {
@Override
public void onShow() {
animationSystem.triggerFromNext();
+ onScreenOpened();
}
@Override
