Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active UI tracking #557

Merged
merged 6 commits into from
Jul 13, 2023
Merged

Active UI tracking #557

merged 6 commits into from
Jul 13, 2023

Conversation

HalfbyteHeroes
Copy link
Member

Currently, when wanting to subscribe to the events exposed by a UIInstanceManager (like onControlsShow), the only way to do that is through the currentUi on the UIManager. However, the currentUi changes whenever the UIManager switches to a different UI variant, and there is currently no event that would allow to detect that.

This PR therefore introduces the onActiveUiChanged event which is dispatched whenever the UIManager switches from one UI variant to another. The arguments of that event expose both the previously active UIInstanceManager, should there be one, and the current one that the UI manager has just switched to.

Additionally, a public activeUi field was added that exposes the UIInstanceManager of the active UI variant.

@HalfbyteHeroes HalfbyteHeroes marked this pull request as ready for review July 12, 2023 08:33
Copy link
Contributor

@bitmovin-kenny bitmovin-kenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one minor thing to think about.

spec/uimanager.spec.ts Show resolved Hide resolved
@HalfbyteHeroes HalfbyteHeroes merged commit 0f546a4 into develop Jul 13, 2023
@HalfbyteHeroes HalfbyteHeroes deleted the feature/active-ui-tracking branch July 13, 2023 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants