I am trying to provide users with my graphics library with unlimited customization of transition / exit effects, while preserving simplicity / preventing misuse (when the control enters or exits the view).
To do this, I added a delegate to the Control class, which will take the control link and the percentage of completion of the transition, so that the user can smoothly translate the control position / opacity in any way that he would like, based on this percentage. All he needs to do is subscribe to the transition function before entering / exiting control.
However, I realized that it would not be possible to translate / animate the controls using only the current completion percentage, because you would need to save and compare the starting position of the control. To make this storage requirement obvious, should I use a delegate functor?
If so, how can I do this in a minimalist / clean way?
Feel free to suggest another way to allow users to apply custom transition animations!
Griffin
source share