Sliding Menu Animation

Sliding Menu Animation 2014/12/15

Creator name: VIPArcher​

Introduction
This script features a sliding menu animation.

Features
- Sliding animation applies to default menu and item screen.
- It bounces a little at the end.

Preview
gLU8RuO.gif


How to Use
Paste this script above Main.

Script link
https://raw.githubusercontent.com/ovate/VIPArcher-rggs3/main/VA_SlidingMenuAnimation

Spoiler: Code
Code:
#==============================================================================
# ■ VA Sliding Menu Animation
#  Inspiration: 100 scholarly papers, written in pencil while depicting my thoughts
# By :VIPArcher [email: [email hidden]]
#  -- The script comes from http://rm.66rpg.com Please keep the information above.
#  Feel free to use/ reprint
#==============================================================================
# This script features a sliding menu animation.
# Applies to default menu and item screen.
#==============================================================================
$VIPArcherScript ||= {};$VIPArcherScript[:menu_slide] = 20141215
#==============================================================================
# ■ Scene_Base
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ● Start post process
  #--------------------------------------------------------------------------
  alias vip_slide_post_start post_start
  def post_start
    init_slide
    vip_slide_post_start
    slide_start
  end
  #--------------------------------------------------------------------------
  # ● Ready before sliding
  #--------------------------------------------------------------------------
  def init_slide ; end
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_start ; end
end
#-------------------------------------------------------------------------------
# ■ The part above should not be change
#==============================================================================
#  Menu screen
#==============================================================================
class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # ● Ready before sliding
  # Define the location of each window from the beginning (which is set outside  of the screen)
  # Which specific window animates in each scene.
  #--------------------------------------------------------------------------
  def init_slide
    @command_window.y -= 150
    @gold_window.x -= 100
    @status_window.x = 260
  end
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_start
    10.times do
      @command_window.y += 15
      @gold_window.x    += 10
      @status_window.x  -= 10
                      # Coordinates of amount per frames
      Graphics.update # Refresh window
    end
    10.times{|i|
    @gold_window.x    += 5 * Math.cos(i)
    @command_window.y += 5 * Math.cos(i)
    Graphics.update}  # Bounce
  end
end
#==============================================================================
#  Item screen
#==============================================================================
class Scene_Item < Scene_ItemBase
  #--------------------------------------------------------------------------
  # ● Slide preparation
  #--------------------------------------------------------------------------
  def init_slide
    @category_window.x -= 100
    @item_window.y += 100
    @help_window.y -= 60
  end
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_start
    10.times do
      @category_window.x += 10
      @item_window.y -= 10
      @help_window.y += 6
      # Coordinates of amount per frames
      Graphics.update # Refresh window
    end
  end
end

Credit and Thanks:
VIPArcher

Terms of Use- Free for commercial and non-commercial use.

License - MIT License: http://opensource.org/licenses/mit-license.php
Hi, i really like this script and I wanted to know if it's possible to add the same animation but reversed when you close the menu 🙂
This should work
change the number for how many times to make it move more
Ruby:
#==============================================================================
# ■ Scene_Base
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ● Window sliding out process
  #--------------------------------------------------------------------------
  def slide_end ; end
  #--------------------------------------------------------------------------
  # ● Window sliding cancel process
  #--------------------------------------------------------------------------
  alias r2_slide_cancel_scene return_scene
  def return_scene
    slide_end
    r2_slide_cancel_scene
  end
end
#==============================================================================
#  Menu screen
#==============================================================================
class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_end
    10.times do
      @command_window.y -= 15
      @gold_window.x    -= 10
      @status_window.x  += 10
                      # Coordinates of amount per frames
      Graphics.update # Refresh window
    end
    10.times{|i|
    @gold_window.x    -= 5 * Math.cos(i)
    @command_window.y -= 5 * Math.cos(i)
    Graphics.update}  # Bounce
  end
end
class Scene_Item < Scene_ItemBase
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_end
    10.times do
      @category_window.x -= 10
      @item_window.y += 10
      @help_window.y -= 6
      # Coordinates of amount per frames
      Graphics.update # Refresh window
    end
  end
end
repeat for other scenes.
This should work
change the number for how many times to make it move more
Ruby:
#==============================================================================
# ■ Scene_Base
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ● Window sliding out process
  #--------------------------------------------------------------------------
  def slide_end ; end
  #--------------------------------------------------------------------------
  # ● Window sliding cancel process
  #--------------------------------------------------------------------------
  alias r2_slide_cancel_scene return_scene
  def return_scene
    slide_end
    r2_slide_cancel_scene
  end
end
#==============================================================================
#  Menu screen
#==============================================================================
class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_end
    10.times do
      @command_window.y -= 15
      @gold_window.x    -= 10
      @status_window.x  += 10
                      # Coordinates of amount per frames
      Graphics.update # Refresh window
    end
    10.times{|i|
    @gold_window.x    -= 5 * Math.cos(i)
    @command_window.y -= 5 * Math.cos(i)
    Graphics.update}  # Bounce
  end
end
class Scene_Item < Scene_ItemBase
  #--------------------------------------------------------------------------
  # ● Window sliding process
  #--------------------------------------------------------------------------
  def slide_end
    10.times do
      @category_window.x -= 10
      @item_window.y += 10
      @help_window.y -= 6
      # Coordinates of amount per frames
      Graphics.update # Refresh window
    end
  end
end
repeat for other scenes.
It's perfect, thank you <3
Now if we could add in a customizable SE audio feature, it would be perfect!

Original thread: https://forums.rpgmakerweb.com/threads/sliding-menu-animation.81314/