iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> Simple Quit, Version 1.0
Rating 5 V
Niclas
post Dec 28 2011, 10:01 PM
Post #1


Whats this?
Group Icon


Type: Designer
Alignment: Lawful Good




Simple Quit

Version: 1.0


Introduction
Yet another one from me. Modify the Scene_End with this script, it has a few neat features.

Features
  • Plug and play!
  • Easy to change the settings of the window as well as add new items to it.
  • Use a custom image background instead of the default one.
  • Confirm window. Never ever can you accidently select a option unless your 100% you want to proceed.

Screenshots


How to Use
To install this script, open up your script editor and copy/paste this script to an open slot below Materials but above Main. Remember to save.

Script
Spoiler:
CODE
#==============================================================================
#   Simple Quit
#   Author: Nicke
#   Created: 27/12/2011
#   Edited: 30/12/2011
#   Version: 1.0
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# A simple end scene with a few features. No need for explaining how it works.
#==============================================================================
($imported ||= {})["NICKE-SIMPLE-QUIT"] = true

module NICKE
  module QUIT
    #--------------------------------------------------------------------------#
    # * Settings
    #--------------------------------------------------------------------------#
    # When adding a new item make sure you edit in quit_command method as well.
    # Right now it supports 5 items with the appropriated methods to it.
    # CMDS ['STRING 1', 'STRING 2'] etc.
    CMDS = ['Quit', 'Save', 'Load', 'Title', 'Back']
    
    # If you use CMDS.size the items will be pushed horizontal.
    # Bare in mind that if you add too many they will eventually go off screen.
    # WINDOW [ columns, x, y, z, opacity, center window]
    WINDOW = [CMDS.size, 0, 0, 200, 255, false]
    
    # CONFIRM_WINDOW [ columns, x, y, z, opacity, center window ]
    CONFIRM_WINDOW = [2, 200, 200, 200, 255, true]
    
    # Transition, nil to use default.
    # TRANSITION [ SPEED, TRANSITION, OPACITY ]
    # TRANSITION = [40, "Graphics/Transitions/1", 50]
    TRANSITION = nil
    
    # BACKGROUND IMAGE (System folder)
    # Set to nil to use default.
    BACK = nil
    
    # Return to map instead?
    RETURN_TO_MAP = false
    RETURN_INDEX = 7
    
    # Font and positioning settings for confirm text.
    # CONFIRM_TEXT = [ name, size, color, bold, shadow, x, y, text ]
    CONFIRM_TEXT = ["Rockwell", 24, Color.new(255,200,200), true, true,
                    0, 156, "Confirm"]
  end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** Scene_End
#------------------------------------------------------------------------------
#  New Scene :: Scene_End
#==============================================================================#
class Scene_End < Scene_Base
  
  def initialize(index = 0)
    @command_index = index
  end
  
  alias nicke_end_start start unless $@
  def start(*args, &block)
    super
    nicke_end_start(*args, &block)
  end
  
  alias nicke_end_terminate terminate unless $@
  def terminate(*args, &block)
    super
    nicke_end_terminate(*args, &block)
  end
  
  def create_menu_background
    @menuback_sprite = Sprite.new
    if NICKE::QUIT::BACK.nil?
      @menuback_sprite.bitmap = $game_temp.background_bitmap
      @menuback_sprite.color.set(16, 16, 16, 128)
    else
      @menuback_sprite.bitmap = Cache.system(NICKE::QUIT::BACK)
    end
    update_menu_background
  end
    
  def create_command_window
    @end_menu = []
    for i in NICKE::QUIT::CMDS
      next unless NICKE::QUIT::CMDS.include?(i); @end_menu << i
    end
    @command_window = Window_Command.new(Graphics.width, @end_menu, NICKE::QUIT::WINDOW[0])
    @command_window.index = @command_index
    if NICKE::QUIT::WINDOW[5]
      @command_window.x = (Graphics.width - @command_window.width) / 2
    else
      @command_window.x = NICKE::QUIT::WINDOW[1]
    end
    @command_window.y = NICKE::QUIT::WINDOW[2]
    @command_window.z = NICKE::QUIT::WINDOW[3]
    @command_window.opacity = NICKE::QUIT::WINDOW[4]
    # // Turn off save if save disabled.
    if $game_system.save_disabled    
      @command_window.draw_item(1, false)
    end
    # // Turn off load if no save files found.
    if !check_continue
      @command_window.draw_item(2, false)
    end
    @command_window.open
  end
  
  def create_message_window
    @message_window = Window_Text.new
    @message_window.opacity = 0
  end
  
  def create_confirm_window
    @command_window.active = false
    @confirm_window = Window_Command.new(300, ['Yes', 'No'], NICKE::QUIT::CONFIRM_WINDOW[0])
    if NICKE::QUIT::CONFIRM_WINDOW[5]
      @confirm_window.x = (Graphics.width - @confirm_window.width) / 2
    else
      @confirm_window.x = NICKE::QUIT::CONFIRM_WINDOW[1]
    end
    @confirm_window.y = NICKE::QUIT::CONFIRM_WINDOW[2]
    @confirm_window.z = NICKE::QUIT::CONFIRM_WINDOW[3]
    @confirm_window.opacity = NICKE::QUIT::CONFIRM_WINDOW[4]
    @confirm_window.open
  end
  
  def close_confirm_window
    @confirm_window.dispose unless @confirm_window.nil?
    @confirm_window = nil
    @message_window.dispose unless @message_window.nil?
    @message_window = nil
    @command_window.active = true
  end

  def return_scene
    if NICKE::QUIT::RETURN_TO_MAP
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(NICKE::QUIT::RETURN_INDEX)
    end
  end
  
  def dispose_command_window
    @command_window.dispose unless @command_window.nil?
    @command_window = nil
  end
  
  def dispose_menu_background
    @menuback_sprite.dispose unless @menuback_sprite.nil?
    @menuback_sprite = nil
  end
  
  def update
    update_input
    update_windows
  end
  
  def update_input
    if !@confirm_window.nil?
      update_confirm_window
      return
    end
    if @command_window.active; update_command end
  end
  
  def update_windows
    @command_window.update
    if !@message_window.nil?
      @message_window.update
    end
    if !@confirm_window.nil?
      @confirm_window.update
    end
  end

  def update_command # Main Command
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0...NICKE::QUIT::CMDS.size
        # // Save (If you change positioning, change this)
        if @command_window.index == 1
          if $game_system.save_disabled
            Sound.play_buzzer
            return
          end
        end
        # // Load (If you change positioning, change this)
        if @command_window.index == 2
          if !check_continue
            Sound.play_buzzer
            return
          end
        end
        # // Back (If you add more, change this)
        if @command_window.index == 4
          Sound.play_cancel
          return_scene
          return
        end
        # // Confirm dialog.
          Sound.play_decision
          create_confirm_window
          create_message_window
      end
    end
  end

  def update_confirm_window # Confirm Command
    if Input.trigger?(Input::B)
      close_confirm_window
      Sound.play_cancel
    end
    if Input.trigger?(Input::C)
      case @confirm_window.index
      when 0 # Yes
        Sound.play_decision
        close_confirm_window
        quit_command(@command_window.index)
      when 1 # No
        Sound.play_cancel
        close_confirm_window
      end
    end
  end
  
  def check_continue
    # // Check if any save data is available.
    @continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
  end
  
  def quit_command(index)
    # // Note: Changes should be made here if you wish to add more items to CMDS.
    case index
      when 0; command_shutdown # Quit
      when 1
        if !$game_system.save_disabled
          command_save # Save
          @command_window.draw_item(1, false)
        end
      when 2
        if check_continue
          command_load # Load
          @command_window.index = 2
        else
          @command_window.draw_item(2, false)
        end
      when 3; command_to_title # Title
      when 4; return_scene # Back
    end
  end
  
  def command_save
    # // Save command.
    Sound.play_decision
    close_command_window
    $scene = Scene_File.new(true, false, false)
  end
  
  def command_load
    # // Load command.
    Sound.play_decision
    close_command_window
    $scene = Scene_File.new(false, false, false)
  end

  def command_to_title
    # // Title command.
    Sound.play_decision
    close_command_window
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = Scene_Title.new
    Graphics.fadeout(60)
  end
  
  def command_shutdown
    # // Quit command.
    Sound.play_decision
    close_command_window
    Graphics.fadeout(60)
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = nil
  end
  
  def perform_transition
    if NICKE::QUIT::TRANSITION.nil?
      Graphics.transition(30)
    else
      Graphics.transition(NICKE::QUIT::TRANSITION[0],NICKE::QUIT::TRANSITION[1],NICKE::QUIT::TRANSITION[2])
    end
  end
  
end

#==============================================================================#
# ** Window_Text
#------------------------------------------------------------------------------
#  Class for drawing text.
#==============================================================================#
class Window_Text < Window_Base

  def initialize
    super(0, 0, Graphics.width, Graphics.height)
    refresh
  end
  
  def refresh
    self.contents.clear
    draw_confirm_text
  end
  
  def self_rect
    # Return the value of contents rect.
    return self.contents.rect
  end
  
  def draw_text(x, y, text, align)
    # Method for drawing the text.
    title = self_rect
    title.x = x
    title.y = y
    title.height = 28
    self.contents.draw_text(title,text,align)
  end
  
  def draw_confirm_text
    contents.font.name = NICKE::QUIT::CONFIRM_TEXT[0]
    contents.font.size = NICKE::QUIT::CONFIRM_TEXT[1]
    contents.font.color = NICKE::QUIT::CONFIRM_TEXT[2]
    contents.font.bold = NICKE::QUIT::CONFIRM_TEXT[3]
    contents.font.shadow = NICKE::QUIT::CONFIRM_TEXT[4]
    self.contents.draw_text(NICKE::QUIT::CONFIRM_TEXT[5], NICKE::QUIT::CONFIRM_TEXT[6], self.contents.width - 16, WLH, NICKE::QUIT::CONFIRM_TEXT[7], 1)
  end

end # END OF FILE

#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#


Updates
A few details changed in the settings.

Credit
Do credit me, Nicke, if you are planing on using this script. Thanks.

This post has been edited by Niclas: Dec 30 2011, 07:42 PM


--------------------
Go to the top of the page
 
+Quote Post
   
Rosenblack
post Dec 28 2011, 11:52 PM
Post #2


Nachos are good
Group Icon


Type: Designer
Alignment: Neutral Evil




that is a huge script just to quit a game!
I love it wub.gif


--------------------

Spoiler:

‎. . . . . . . . . . . . . . . . . . . ________
. . . . . .. . . . . . . . . . . ,.-‘”. . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-”. . . . . . . . . . . . . . . . . .“-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . ”:,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:”. . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . .“~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . ”~,_. . . ..“~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . .”=,_. . . .“-,_. . . ,.-~-,}, .~”; /. .. .}
. . .. . .((. . .*~_. . . .”=-._. . .“;,,./`. . /” . . . ./. .. ../
. . . .. . .\`~,. . ..“~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-”
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--==``
. . . . . . . . . . . . . . . . . . . . _\. . . . . ._,-%. . . ..`\

Spoiler:
I SUPPORT



Spoiler:

My Projects
Leonin Chapter 2
Leonin Online (using Vampyr)
Dark Mirror: Death Walks
Go to the top of the page
 
+Quote Post
   
Niclas
post Dec 29 2011, 12:39 AM
Post #3


Whats this?
Group Icon


Type: Designer
Alignment: Lawful Good




@Rosenblack: Thanks... OK.. Slightly changed a bit now too, grab the new update. smile.gif


--------------------
Go to the top of the page
 
+Quote Post
   
Rosenblack
post Dec 29 2011, 03:18 AM
Post #4


Nachos are good
Group Icon


Type: Designer
Alignment: Neutral Evil




will do

EDIT
it tried this myself but cannot do it, im using Neo Save System VI that saves as a .alice extension and in a save folder in the main directory.

im request is that you make for your save and load buttons make it so that you can change the folder that the save to and i see you can change the extension but it is a little hard to get to.
and have this stuff as an optional field because I know not everyone will like it the way i do, can you do this? jolly.gif

This post has been edited by Rosenblack: Dec 29 2011, 03:50 AM


--------------------

Spoiler:

‎. . . . . . . . . . . . . . . . . . . ________
. . . . . .. . . . . . . . . . . ,.-‘”. . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-”. . . . . . . . . . . . . . . . . .“-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . ”:,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:”. . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . .“~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . ”~,_. . . ..“~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . .”=,_. . . .“-,_. . . ,.-~-,}, .~”; /. .. .}
. . .. . .((. . .*~_. . . .”=-._. . .“;,,./`. . /” . . . ./. .. ../
. . . .. . .\`~,. . ..“~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-”
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--==``
. . . . . . . . . . . . . . . . . . . . _\. . . . . ._,-%. . . ..`\

Spoiler:
I SUPPORT



Spoiler:

My Projects
Leonin Chapter 2
Leonin Online (using Vampyr)
Dark Mirror: Death Walks
Go to the top of the page
 
+Quote Post
   
Bcyborg21
post Dec 29 2011, 12:09 PM
Post #5



Group Icon


Type: Undisclosed




QUOTE (Niclas @ Dec 28 2011, 10:01 PM) *
Simple Quit

Version: 1.0


Introduction
Yet another one from me. Modify the Scene_End with this script, it has a few neat features.

Features
  • Plug and play!
  • Easy to change the settings of the window as well as add new items to it.
  • Use a custom image background instead of the default one.
  • Confirm window. Never ever can you accidently select a option unless your 100% you want to proceed.

Screenshots


How to Use
To install this script, open up your script editor and copy/paste this script to an open slot below Materials but above Main. Remember to save.

Script
Spoiler:
CODE
#==============================================================================
#   Simple Quit
#   Author: Nicke
#   Created: 27/12/2011
#   Edited: 29/12/2011
#   Version: 1.0
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
# A simple end scene with a few features. No need for explaining how it works.
#==============================================================================
($imported ||= {})["NICKE-SIMPLE-QUIT"] = true

module NICKE
  module QUIT
    #--------------------------------------------------------------------------#
    # * Settings
    #--------------------------------------------------------------------------#
    # When adding a new item make sure you edit in quit_command method as well.
    # Right now it supports 5 items with the appropriated methods to it.
    # CMDS ['STRING 1', 'STRING 2'] etc.
    CMDS = ['Quit', 'Save', 'Load', 'Title', 'Back']
    
    # If you use CMDS.size the items will be pushed horizontal.
    # Bare in mind that if you add too many they will eventually go off screen.
    # WINDOW [ Columns, x, y, z, opacity, center window]
    WINDOW = [CMDS.size, 0, 0, 200, 255, false]
    
    # CONFIRM_WINDOW [ Columns, x, y, z, opacity, center window ]
    CONFIRM_WINDOW = [2, 200, 200, 200, 255, true]
    
    # Transition, nil to use default.
    # TRANSITION [ SPEED, TRANSITION, OPACITY ]
    TRANSITION = [40, "Graphics/Transitions/1", 50]
    
    # BACKGROUND IMAGE (System folder)
    # Set to nil to use defaultsa.
    BACK = nil
    
    # Return to map instead?
    RETURN_TO_MAP = false
    RETURN_INDEX = 7
    
    # Font and positioning settings for confirm text.
    # CONFIRM_TEXT = [ name, size, color, bold, shadow, x, y, text ]
    CONFIRM_TEXT = ["Rockwell", 24, Color.new(255,200,200), true, true,
                    0, 156, "Confirm"]
  end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** Scene_End
#------------------------------------------------------------------------------
#  New Scene :: Scene_End
#==============================================================================#
class Scene_End < Scene_Base
  
  def initialize(index = 0)
    @command_index = index
  end
  
  alias nicke_end_start start unless $@
  def start(*args, &block)
    super
    nicke_end_start(*args, &block)
  end
  
  alias nicke_end_terminate terminate unless $@
  def terminate(*args, &block)
    super
    nicke_end_terminate(*args, &block)
  end
  
  def create_menu_background
    @menuback_sprite = Sprite.new
    if NICKE::QUIT::BACK.nil?
      @menuback_sprite.bitmap = $game_temp.background_bitmap
      @menuback_sprite.color.set(16, 16, 16, 128)
    else
      @menuback_sprite.bitmap = Cache.system(NICKE::QUIT::BACK)
    end
    update_menu_background
  end
    
  def create_command_window
    @end_menu = []
    for i in NICKE::QUIT::CMDS
      next unless NICKE::QUIT::CMDS.include?(i); @end_menu << i
    end
    @command_window = Window_Command.new(Graphics.width, @end_menu, NICKE::QUIT::WINDOW[0])
    @command_window.index = @command_index
    if NICKE::QUIT::WINDOW[5]
      @command_window.x = (Graphics.width - @confirm_window.width) / 2
    else
      @command_window.x = NICKE::QUIT::WINDOW[1]
    end
    @command_window.x = NICKE::QUIT::WINDOW[1]
    @command_window.y = NICKE::QUIT::WINDOW[2]
    @command_window.z = NICKE::QUIT::WINDOW[3]
    @command_window.opacity = NICKE::QUIT::WINDOW[4]
    # // Turn off save if save disabled.
    if $game_system.save_disabled    
      @command_window.draw_item(1, false)
    end
    # // Turn off load if no save files found.
    if !check_continue
      @command_window.draw_item(2, false)
    end
    @command_window.open
  end
  
  def create_message_window
    @message_window = Window_Text.new
    @message_window.opacity = 0
  end
  
  def create_confirm_window
    @command_window.active = false
    @confirm_window = Window_Command.new(300, ['Yes', 'No'], NICKE::QUIT::CONFIRM_WINDOW[0])
    if NICKE::QUIT::CONFIRM_WINDOW[5]
      @confirm_window.x = (Graphics.width - @confirm_window.width) / 2
    else
      @confirm_window.x = NICKE::QUIT::CONFIRM_WINDOW[1]
    end
    @confirm_window.y = NICKE::QUIT::CONFIRM_WINDOW[2]
    @confirm_window.z = NICKE::QUIT::CONFIRM_WINDOW[3]
    @confirm_window.opacity = NICKE::QUIT::CONFIRM_WINDOW[4]
    @confirm_window.open
  end
  
  def close_confirm_window
    @confirm_window.dispose unless @confirm_window.nil?
    @confirm_window = nil
    @message_window.dispose unless @message_window.nil?
    @message_window = nil
    @command_window.active = true
  end

  def return_scene
    if NICKE::QUIT::RETURN_TO_MAP
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(NICKE::QUIT::RETURN_INDEX)
    end
  end
  
  def dispose_command_window
    @command_window.dispose unless @command_window.nil?
    @command_window = nil
  end
  
  def dispose_menu_background
    @menuback_sprite.dispose unless @menuback_sprite.nil?
    @menuback_sprite = nil
  end
  
  def update
    update_input
    update_windows
  end
  
  def update_input
    if !@confirm_window.nil?
      update_confirm_window
      return
    end
    if @command_window.active; update_command end
  end
  
  def update_windows
    @command_window.update
    if !@message_window.nil?
      @message_window.update
    end
    if !@confirm_window.nil?
      @confirm_window.update
    end
  end

  def update_command # Main Command
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0...NICKE::QUIT::CMDS.size
        # // Save (If you change positioning, change this)
        if @command_window.index == 1
          if $game_system.save_disabled
            Sound.play_buzzer
            return
          end
        end
        # // Load (If you change positioning, change this)
        if @command_window.index == 2
          if !check_continue
            Sound.play_buzzer
            return
          end
        end
        # // Back (If you add more, change this)
        if @command_window.index == 4
          Sound.play_cancel
          return_scene
          return
        end
        # // Confirm dialog.
          Sound.play_decision
          create_confirm_window
          create_message_window
      end
    end
  end

  def update_confirm_window # Confirm Command
    if Input.trigger?(Input::B)
      close_confirm_window
      Sound.play_cancel
    end
    if Input.trigger?(Input::C)
      case @confirm_window.index
      when 0 # Yes
        Sound.play_decision
        close_confirm_window
        quit_command(@command_window.index)
      when 1 # No
        Sound.play_cancel
        close_confirm_window
      end
    end
  end
  
  def check_continue
    # // Check if any save data is available.
    @continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
  end
  
  def quit_command(index)
    # // Note: Changes should me made here if you added more items to CMDS.
    case index
      when 0; command_shutdown # Quit
      when 1
        if !$game_system.save_disabled
          command_save # Save
          @command_window.draw_item(1, false)
        end
      when 2
        if check_continue
          command_load # Load
          @command_window.index = 2
        else
          @command_window.draw_item(2, false)
        end
      when 3; command_to_title # Title
      when 4; return_scene # Back
    end
  end
  
  def command_save
    # // Save command.
    Sound.play_decision
    close_command_window
    $scene = Scene_File.new(true, false, false)
  end
  
  def command_load
    # // Load command.
    Sound.play_decision
    close_command_window
    $scene = Scene_File.new(false, false, false)
  end

  def command_to_title
    # // Title command.
    Sound.play_decision
    close_command_window
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = Scene_Title.new
    Graphics.fadeout(60)
  end
  
  def command_shutdown
    # // Quit command.
    Sound.play_decision
    close_command_window
    Graphics.fadeout(60)
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = nil
  end
  
  def perform_transition
    if NICKE::QUIT::TRANSITION.nil?
      Graphics.transition(30)
    else
      Graphics.transition(NICKE::QUIT::TRANSITION[0],NICKE::QUIT::TRANSITION[1],NICKE::QUIT::TRANSITION[2])
    end
  end
  
end

#==============================================================================#
# ** Window_Text
#------------------------------------------------------------------------------
#  Class for drawing text.
#==============================================================================#
class Window_Text < Window_Base

  def initialize
    super(0, 0, Graphics.width, Graphics.height)
    refresh
  end
  
  def refresh
    self.contents.clear
    draw_confirm_text
  end
  
  def self_rect
    # Return the value of contents rect.
    return self.contents.rect
  end
  
  def draw_text(x, y, text, align)
    # Method for drawing the text.
    title = self_rect
    title.x = x
    title.y = y
    title.height = 28
    self.contents.draw_text(title,text,align)
  end
  
  def draw_confirm_text
    contents.font.name = NICKE::QUIT::CONFIRM_TEXT[0]
    contents.font.size = NICKE::QUIT::CONFIRM_TEXT[1]
    contents.font.color = NICKE::QUIT::CONFIRM_TEXT[2]
    contents.font.bold = NICKE::QUIT::CONFIRM_TEXT[3]
    contents.font.shadow = NICKE::QUIT::CONFIRM_TEXT[4]
    self.contents.draw_text(NICKE::QUIT::CONFIRM_TEXT[5], NICKE::QUIT::CONFIRM_TEXT[6], self.contents.width - 16, WLH, NICKE::QUIT::CONFIRM_TEXT[7], 1)
  end

end # END OF FILE

#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#


Updates
A few details changed in the settings.

Credit
Do credit me, Nicke, if you are planing on using this script. Thanks.


, Thisi is useful script . . . . ,, cool.gif cool.gif
Go to the top of the page
 
+Quote Post
   
Niclas
post Dec 29 2011, 12:51 PM
Post #6


Whats this?
Group Icon


Type: Designer
Alignment: Lawful Good




@Rosenblack: Hmm I will see if I can make it. But I am unsure how you want it, my script only calls the Scene_File for load/save so it doesn't change anything regarding the save function.

@Bcyborg21: Thanks!

This post has been edited by Niclas: Dec 29 2011, 05:57 PM


--------------------
Go to the top of the page
 
+Quote Post
   
Rosenblack
post Dec 29 2011, 06:38 PM
Post #7


Nachos are good
Group Icon


Type: Designer
Alignment: Neutral Evil




thanks


--------------------

Spoiler:

‎. . . . . . . . . . . . . . . . . . . ________
. . . . . .. . . . . . . . . . . ,.-‘”. . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-”. . . . . . . . . . . . . . . . . .“-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . ”:,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:”. . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . .“~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . ”~,_. . . ..“~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . .”=,_. . . .“-,_. . . ,.-~-,}, .~”; /. .. .}
. . .. . .((. . .*~_. . . .”=-._. . .“;,,./`. . /” . . . ./. .. ../
. . . .. . .\`~,. . ..“~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-”
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--==``
. . . . . . . . . . . . . . . . . . . . _\. . . . . ._,-%. . . ..`\

Spoiler:
I SUPPORT



Spoiler:

My Projects
Leonin Chapter 2
Leonin Online (using Vampyr)
Dark Mirror: Death Walks
Go to the top of the page
 
+Quote Post
   
Niclas
post Dec 29 2011, 08:16 PM
Post #8


Whats this?
Group Icon


Type: Designer
Alignment: Lawful Good




@Rosenblack: Do you care to elaborate what you actually want me to do? Is it something in with my script or with Scene_File? Please explain ^^


--------------------
Go to the top of the page
 
+Quote Post
   
Rosenblack
post Dec 29 2011, 11:55 PM
Post #9


Nachos are good
Group Icon


Type: Designer
Alignment: Neutral Evil




i have it set to save my files into a save folder and your script cannot find them so the load function is not working at all also i cant get rid of the save and load buttons to fix the problem either


--------------------

Spoiler:

‎. . . . . . . . . . . . . . . . . . . ________
. . . . . .. . . . . . . . . . . ,.-‘”. . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-”. . . . . . . . . . . . . . . . . .“-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . ”:,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:”. . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . .“~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . ”~,_. . . ..“~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . .”=,_. . . .“-,_. . . ,.-~-,}, .~”; /. .. .}
. . .. . .((. . .*~_. . . .”=-._. . .“;,,./`. . /” . . . ./. .. ../
. . . .. . .\`~,. . ..“~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-”
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--==``
. . . . . . . . . . . . . . . . . . . . _\. . . . . ._,-%. . . ..`\

Spoiler:
I SUPPORT



Spoiler:

My Projects
Leonin Chapter 2
Leonin Online (using Vampyr)
Dark Mirror: Death Walks
Go to the top of the page
 
+Quote Post
   
Niclas
post Dec 30 2011, 05:21 PM
Post #10


Whats this?
Group Icon


Type: Designer
Alignment: Lawful Good




@Rosenblack: Oh ok, you want my script to be compatible with Neo Save System?


--------------------
Go to the top of the page
 
+Quote Post
   
Rosenblack
post Dec 30 2011, 07:05 PM
Post #11


Nachos are good
Group Icon


Type: Designer
Alignment: Neutral Evil




yup, so if i was unclear.
Im need to requesting things to be added to things and the whole half asleep everytime im on here dry.gif


--------------------

Spoiler:

‎. . . . . . . . . . . . . . . . . . . ________
. . . . . .. . . . . . . . . . . ,.-‘”. . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-”. . . . . . . . . . . . . . . . . .“-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . ”:,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:”. . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . .“~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . ”~,_. . . ..“~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . .”=,_. . . .“-,_. . . ,.-~-,}, .~”; /. .. .}
. . .. . .((. . .*~_. . . .”=-._. . .“;,,./`. . /” . . . ./. .. ../
. . . .. . .\`~,. . ..“~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-”
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--==``
. . . . . . . . . . . . . . . . . . . . _\. . . . . ._,-%. . . ..`\

Spoiler:
I SUPPORT



Spoiler:

My Projects
Leonin Chapter 2
Leonin Online (using Vampyr)
Dark Mirror: Death Walks
Go to the top of the page
 
+Quote Post
   
chisox8
post Apr 15 2012, 09:20 PM
Post #12



Group Icon


Type: Undisclosed
Alignment: Unaligned




Nice script! However, when I click "Quit" (in the main menu) and it brings me to the scripts menu, if I press escape from in that menu, it brings me back to the main menu, but 2 buttons down from the last button (eg, it adds to random blank buttons that I can't move once I am on!)


Is this a bug? Is there a fix?

Thanks!

EDIT: Sorry for necro-posting btw, but this is a great script, and I thought you should know (also I want to get this fixed so I can use it!)

This post has been edited by chisox8: Apr 15 2012, 10:04 PM
Go to the top of the page
 
+Quote Post
   
Niclas
post Apr 16 2012, 03:27 PM
Post #13


Whats this?
Group Icon


Type: Designer
Alignment: Lawful Good




@chisox8: I am sorry but I wont be updating any scripts in VX since I've moved on to Ace.


--------------------
Go to the top of the page
 
+Quote Post
   
chisox8
post Apr 16 2012, 09:27 PM
Post #14



Group Icon


Type: Undisclosed
Alignment: Unaligned




QUOTE (Niclas @ Apr 16 2012, 10:27 AM) *
@chisox8: I am sorry but I wont be updating any scripts in VX since I've moved on to Ace.


Hmm, thats too bad. Ok sad.gif
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd August 2014 - 02:41 AM

RPGMakerVX.net is an Privacy Policy, Legal.