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

Further refactor/rewrite ModelBackedDrawable #2466

Closed

Conversation

smoogipoo
Copy link
Contributor

Attempt #2, since there were regressions relating to the placeholder.

Important changes:

  1. Placeholder is now created via the CreatePlaceholder() method. It is null by default, not CreateDrawable(null).
  2. ReplaceDrawable() has been split into ApplyHideTransforms() and ApplyShowTransforms().
  3. The placeholder is shown in the background before a foreground model is hidden, and hidden in the background after a foreground has been shown.
    1. Naturally, this means there is now only one single placeholder, rather than created with every model change.
  4. The placeholder is now in a DLW itself.
  5. CreateDelayedLoadWrapper() now handles recreation of content internally, removing the need for code such as https://github.com/ppy/osu/blob/master/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs#L39 in the case of using an unload wrapper.

@peppy peppy mentioned this pull request May 31, 2019
1 task
@smoogipoo
Copy link
Contributor Author

Superseded by #2467

@smoogipoo smoogipoo closed this May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants