The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on July 01, 2011, 04:52:06 PM

Title: Chigoo's Sliding DMS
Post by: modern algebra on July 01, 2011, 04:52:06 PM
Chigoo's Sliding Default Menu System
Version: 1.0
Author: modern algebra
Date: Canada Day, 2011 (July 1)

Version History



Description


This is a menu, requested by chigoo, which is the same as the default menu except instead of the status window always being present, the command window shows up in the middle of the screen and the status window is off-screen. Once you select an option, however, the windows slide back into the places they belong.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg231.imageshack.us%2Fimg231%2F1088%2Fchigooscreen.png&hash=7fea4673ec744f6983d1aaa4f4d51965e2d33094)

Instructions

This script REQUIRES Sliding Graphics 1.0 (http://rmrk.net/index.php/topic,43067.0.html).

Add this script into its own slot in the Script Editor, above Main but below any other custom scripts you might have.

See the header of the scripts for further instructions.

Script


Code: [Select]
#==============================================================================
#    Chigoo's Sliding DMS
#      Sample use of Sliding Graphics 1.0
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: Canada Day, 2011 (July 1)
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This is a menu, requested by chigoo, which is the same as the default menu
#   except instead of the status window always being present, the command
#   window shows up in the middle of the screen and the status window is off-
#   screen. Once you select an option, however, the windows slide back into the
#   places they belong.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    This script REQUIRES Sliding Graphics 1.0. Simply paste both scripts below
#   Materials and somewhere above Main.
#
#    In the Editable Region at line 26, there are options where you can choose
#   how fast they slide and what SEs play at the start and end of the slide.
#==============================================================================

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#  EDITABLE REGION
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CHIGOO_SLIDE_FRAMES = 30 # How many frames it takes for the slide to complete
#  For both the Start SE and the Finish SE, they can be either a string and
# it will play that file at 100 volume and 100 pitch, or you can specify the
# volume and pitch by instead using an array in the form of:
#    ["SE file", volume, pitch]
CHIGOO_START_SE = "" # The SE to play when starting the slide
CHIGOO_FINISH_SE = ["Flash1", 100, 80] # The SE to play when ending the slide
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#  END EDITABLE REGION
#////////////////////////////////////////////////////////////////////////////
 
$imported = {} unless $imported
$imported["ChigooSlideMenu"] = true

#==============================================================================
# ** Scene_Menu
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - start; start_actor_selection; end_actor_selection
#==============================================================================

class Scene_Menu
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mal_chig_grphsl_start_2as7 start
  def start (*args, &block)
    mal_chig_grphsl_start_2as7 (*args, &block) # Run Original Method
    @command_window.x = (Graphics.width - @command_window.width) / 2
    @command_window.y = (Graphics.height - @gold_window.height - @command_window.height) / 2
    @gold_window.x = (Graphics.width - @gold_window.width) / 2
    @status_window.x = Graphics.width
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Actor Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mlgb_chigoo_strtactr_6yk8 start_actor_selection
  def start_actor_selection (*args, &block)
    mlgb_chigoo_strtactr_6yk8 (*args, &block) # Run Original Method
    start_slide (0, @gold_window.y, @gold_window, CHIGOO_SLIDE_FRAMES, CHIGOO_START_SE, CHIGOO_FINISH_SE)
    start_slide (0, 0, @command_window, CHIGOO_SLIDE_FRAMES)
    start_slide (@command_window.width, @status_window.y, @status_window, CHIGOO_SLIDE_FRAMES)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * End Actor Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mag_chig_slidmen_endactsel_7ik1 end_actor_selection
  def end_actor_selection (*args, &block)
    mag_chig_slidmen_endactsel_7ik1 (*args, &block) # Run Original Method
    x = (Graphics.width - @gold_window.width) / 2
    start_slide (x, @gold_window.y, @gold_window, CHIGOO_SLIDE_FRAMES, [], CHIGOO_FINISH_SE)
    x = (Graphics.width - @command_window.width) / 2
    y = (Graphics.height - @gold_window.height - @command_window.height) / 2
    start_slide (x, y, @command_window, CHIGOO_SLIDE_FRAMES)
    start_slide (Graphics.width, @status_window.y, @status_window, CHIGOO_SLIDE_FRAMES)
  end
end

Credit



Thanks


Support


Please post here in this topic for support. Do not PM me.

Known Compatibility Issues

May not work as desired with menu systems other than the DMS.

Demo


See the sample demo (http://rmrk.net/index.php?action=dlattach;topic=43067.0;attach=23778) of Sliding Graphics 1.0 (http://rmrk.net/index.php/topic,43067.0.html)
Title: Re: Chigoo's Sliding DMS
Post by: chigoo on August 16, 2011, 12:19:23 AM
this is really awesome! way better than the default menu.
Title: Re: Chigoo's Sliding DMS
Post by: modern algebra on August 18, 2011, 03:44:20 PM
I'm glad you like it. It is a pretty simple script.