#============================================================================== # ** Scene_File #------------------------------------------------------------------------------ # This is a superclass for the save screen and load screen. #============================================================================== class Scene_File #-------------------------------------------------------------------------- # * Object Initialization # help_text : text string shown in the help window #-------------------------------------------------------------------------- def initialize(help_text) @help_text = help_text end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Select last file to be operated @file_index = $game_temp.last_file_index # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # If C button was pressed on_decision(make_filename(@file_index)) $game_temp.last_file_index = @file_index return end # If B button was pressed if Input.trigger?(Input::B) # Call method: on_cancel (defined by the subclasses) on_cancel return end #-------------------------------------------------------------------------- # * Make File Name # file_index : save file index (0-3) #-------------------------------------------------------------------------- def make_filename(file_index) return "Save Data.rxdata" end