Window Animation Designer
This script provides animation properties that allow you to easily design window animations using a declarative approach. Rather than writing how the animation should be performed, you simply write what you expect it to do, and this designer handles the animation for you!
There are two types of animations
- opening animations
- closing animations
Opening animations are run whenever a window is opened, while closing animations are run whenever a window is closed.
The following animation options are available, which you can use to design your animations
- Window moving
- Window resizing
- Window fading
Script: download here
Here are some examples of custom menu window animations. To see them in action, copy them under this script, run your game, then open the party menu.
Sample1 – window slides in from the outside, slides out outwards
Sample2 – window slides in from the outside, then crosses across the screen
Sample3 – windows slide in from the outside, performs fade-in and fade-out. These are the animations used for the preview picture.
Place this script below Materials and above Main
To create an opening animation, define the following method in your window:
def opening_animation # animation options end
To create a closing animation, define the following method in your window
def closing_animation # animation options end
The following animation options are available
@new_x - moves the window to the new x coord @new_y - moves the window to the new y coord @new_width - adjusts the width of the window @new_height - adjusts the height of the window @new_opacity - adjust the opacity of the window @fade_speed - how fast the opacity changes @slide_speed - how fast the size and position change
See the examples for a demonstration on how they are used.
Note that the initial positions and other properties of the window may need to be changed in order to achieve the desired animation effects. For example, if you want a window to slide in from outside the screen, you need to first re-position the window outside of the screen before specifying the new x or y positions.