Added static Starling.all property to get all Starling instances#527
Merged
PrimaryFeather merged 1 commit intoGamua:masterfrom Apr 22, 2014
joshtynjala:all
Merged
Added static Starling.all property to get all Starling instances#527PrimaryFeather merged 1 commit intoGamua:masterfrom joshtynjala:all
PrimaryFeather merged 1 commit intoGamua:masterfrom
joshtynjala:all
Conversation
…is added in constructor and removed on dispose).
PrimaryFeather
added a commit
that referenced
this pull request
Apr 22, 2014
Added static Starling.all property to get all Starling instances
Contributor
|
I can see what you mean, Josh — yes, that makes sense! I merged that change into the master branch. Thanks! 😄 |
Contributor
Author
|
Thank you, Daniel! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to
Starling.current, but it gets all Starling instances. An instance is added in its constructor and removed when itsdispose()function is called.Use Cases
I have a reference to a
starling.display.Stage. It would be nice if I could somehow get thestarling.core.Starlinginstance that owns it. For instance, I might want to know thenativeStagethat is associated with this Starling stage so that I can position something properly above Starling in an AIRNativeWindow. Looping through the vector returned by the staticStarling.allproperty would allow me to find the right Starling instance pretty easily.An AIR
NativeWindowhas astageproperty, which makes it easy to access the native display list of the active window withNativeApplication.activeWindow.stage. However, there's no way to get a Starling stage for an arbitraryNativeWindow. Similar to the previous use case, I can loop through the staticStarling.allproperty and check ifNativeApplication.activeWindow.stagematches a Starling instance'snativeStageproperty.