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.
This resolves #1831
In order to fix this issue i implemented it as described in #1826 (comment)
I had to change a few things:
Overlay
that uses the backgrounds to draw the actual background that needs to be displayed._fade_in(float)
and_fade_out(float)
have been reduced to notifications that the background scene is fading in/out, i think this is the best fit for them, as the transition.1
and a midtone gray respectively. This paves the road for possible custom transitions using whipe textures.Breaking changes:
_fade_in(float)
and_fade_out(float)
will likely behave in an unexpected way, i didn't have a use case to test how they would behave.What this allows for in the future:
Custom transitions using self made textures (easy for developers) - The mechansim implemented for the transitions here makes use of a whipe texture with a feather already, the code needs to be altered in such a way that it keeps the current settings as a default if no whipe texture is provided. There might also need to be an option to indicate how the whipe texture should be applied (toggle between stretch to rect VS scaled to keep the aspect ratio) I don't think it would be a hard task, but requires a bit of UI design.
Custom transitions using custom shaders (harder for developers) - The shader would have to have a material replace the material in the overlay material, this would require a bit more thought, it will essentially be like the texture transitions, but will require some more code to make sure that the properties are set right. It will require a bit more UI work in order to get this to work well. I would imagine that if this were to be added, it will need to make use of the Key Value pair element that i made for Allow for signal events to optionally pass dictionaries instead of strings #1829, but more advanced to allow for data types outside strings. I think this feature is possible, but definitely an advanced feature.