Save-Point
Scene Title Alva - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker VX/VXAce (RGSS2/3) Engines (https://www.save-point.org/forum-117.html)
+---- Thread: Scene Title Alva (/thread-5080.html)



Scene Title Alva - Mintyy - 03-26-2014

[RPG Maker VX Ace] Scene Title Alva
Author: Soulpour777
Version 1.0
Web URL: infinitytears.wordpress.com


Description:
This title screen features the use of images as commands instead of the common buttons done vertically.


Using the title screen:
- All images used for the title commands should be inside the Graphics/Systems folder.


Script:
Code:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# [RPG Maker VX Ace] Scene Title Alva
# Author: Soulpour777
# Version 1.0
# Web URL: infinitytears.wordpress.com
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description:
# This title screen features the use of images as commands instead of the
# common buttons done vertically.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Using the title screen:
# - All images used for the title commands should be inside the Graphics/Systems
# folder.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

module Soulpour
  module Title_Alva
    #--------------------------------------------------------------------------
    # * Module Variables
    #--------------------------------------------------------------------------
    # Game Name Image
    Game_Image = "Title_Name"
    #New Game Button Image
    NewGame_Frame = "Story_Frame"
    # Continue Button Image
    Continue_Frame = "Remember_Frame"
    # Quit Button Image
    End_Frame = "Forsake_Frame"
    # Scrolling Parallax for the Title Screen
    Title_Parallax = "Mountains5"
    # What is the speed of your parallax scrolling?
    Panorama_Speed = 1
    # What is the name of the music to be played on the title screen?
    # if you're going to use a custom bgm, make sure it is under your BGM
    # folder.
    Title_BGM = "Theme5"
    # What is the volume of your BGM?
    BGM_Volume = 100
  end
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  alias :alva_scene_title_start :start
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    alva_scene_title_start
    create_game_frames
  end
  #--------------------------------------------------------------------------
  # * Create Game Frames
  #--------------------------------------------------------------------------
  def create_game_frames
    @frame_first = Sprite.new
    @frame_first.bitmap = Cache.system(Soulpour::Title_Alva::NewGame_Frame)
    @frame_first.z = 3
    @frame_first.x = 12
    @frame_first.y = 103
    @second_frame = Sprite.new
    @second_frame.bitmap = Cache.system(Soulpour::Title_Alva::Continue_Frame)
    @second_frame.z = 3
    @second_frame.x = 196
    @second_frame.y = 103   
    @third_frame = Sprite.new
    @third_frame.bitmap = Cache.system(Soulpour::Title_Alva::End_Frame)
    @third_frame.z = 3
    @third_frame.x = 380
    @third_frame.y = 103     
  end
  #--------------------------------------------------------------------------
  # * Update Frame (Basic)
  #--------------------------------------------------------------------------
  def update_basic
    Graphics.update
    Input.update
    update_all_windows
    @alva_sprite.ox += Soulpour::Title_Alva::Panorama_Speed
  end
  #--------------------------------------------------------------------------
  # * Create Background
  #--------------------------------------------------------------------------
  def create_background
    @alva_sprite = Plane.new
    @alva_sprite.bitmap = Cache.parallax(Soulpour::Title_Alva::Title_Parallax)
  end
  #--------------------------------------------------------------------------
  # * Free Background
  #--------------------------------------------------------------------------
  def dispose_background
    @alva_sprite.bitmap.dispose
    @alva_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Draw Game Title
  #--------------------------------------------------------------------------
  def draw_game_title
    @foreground_sprite = Sprite.new
    @foreground_sprite.bitmap = Cache.system(Soulpour::Title_Alva::Game_Image)
    @foreground_sprite.x = 80
    @foreground_sprite.y = 0
  end
  #--------------------------------------------------------------------------
  # * Play Title Screen Music
  #--------------------------------------------------------------------------
  def play_title_music
    RPG::BGM.new(Soulpour::Title_Alva::Title_BGM, Soulpour::Title_Alva::BGM_Volume, 100).play
    RPG::BGS.stop
    RPG::ME.stop
  end
end

#==============================================================================
# ** Window_TitleCommand
#------------------------------------------------------------------------------
#  This window is for selecting New Game/Continue on the title screen.
#==============================================================================

class Window_TitleCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias :alva_titlecommand_initialize :initialize
  def initialize
    alva_titlecommand_initialize
    self.opacity = 0
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return Graphics.width
  end
  #--------------------------------------------------------------------------
  # * Get Window Height
  #--------------------------------------------------------------------------
  def window_height
    return Graphics.height - 140
  end
  #--------------------------------------------------------------------------
  # * Columns
  #--------------------------------------------------------------------------
  def col_max
    return 3
  end
  #--------------------------------------------------------------------------
  # * Get Rectangle for Drawing Items
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new
    rect.width = item_width
    rect.height = window_height - 42
    rect.x = index % col_max * (item_width + spacing)
    rect.y = index / col_max * item_height
    rect
  end
  #--------------------------------------------------------------------------
  # * Update Window Position
  #--------------------------------------------------------------------------
  def update_placement
    self.x = 0
    self.y = 90
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command("", :new_game)
    add_command("", :continue, continue_enabled)
    add_command("", :shutdown)
  end
end

From Soul X Regalia Wordpress