Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Default title screen to DSi System
- &beta
- =end
- Ligni.register(:dsi_title, "dax", 0.1, [[:dsi, "dax"]]) {
- # [Scene_Title]
- class Scene_Title < Scene_Base
- # [main]
- def start
- $game_system.default_background = DS::SETUP[:TITLE][:BACKGROUND_DOWN]
- super
- SceneManager.clear
- Graphics.freeze
- create_background
- create_logo
- create_option
- play_title_music
- @phrase = Sprite.new([DS.screen.width, 18])
- Ligni::Position[@phrase, :center]
- @phrase.z = DS.screen.z + 10
- @phrase.y += 4
- @phrase.bitmap.font.size = 14
- @phrase.bitmap.draw_text_rect(DS::VERSION, 1)
- end
- # [background]
- def create_background
- @background_up = Sprite.new("S: #{DS::SETUP[:TITLE][:BACKGROUND_UP]}")
- end
- # [logo]
- def create_logo
- @logo = Sprite.new("S: #{DS::SETUP[:TITLE][:LOGO]}")
- @logo.z = DS.screen.z + 1
- end
- # [option]
- def create_option
- @command_window = Window_TitleCommand.new
- @command_window.set_handler(:new_game, method(:command_new_game))
- @command_window.set_handler(:continue, method(:command_continue))
- @command_window.set_handler(:shutdown, method(:command_shutdown))
- @command_window.y = DS.screen.height + ( (DS.screen.height - @command_window.height) / 2 )
- @command_window.z = DS.screen.z + 1
- end
- # [terminate]s
- def terminate
- super
- SceneManager.snapshot_for_background
- [@background_up, @logo, @phrase].each(&:dispose)
- end
- #--------------------------------------------------------------------------
- # * Fechamento da janela de comando
- #--------------------------------------------------------------------------
- def close_command_window
- @command_window.close
- update until @command_window.close?
- end
- #--------------------------------------------------------------------------
- # * Comando [Novo Jogo]
- #--------------------------------------------------------------------------
- def command_new_game
- DataManager.setup_new_game
- close_command_window
- fadeout_all
- $game_map.autoplay
- SceneManager.goto(Scene_Map)
- end
- #--------------------------------------------------------------------------
- # * Comando [Continuar]
- #--------------------------------------------------------------------------
- def command_continue
- close_command_window
- SceneManager.call(Scene_DSLoad)
- end
- #--------------------------------------------------------------------------
- # * Comando [Sair]
- #--------------------------------------------------------------------------
- def command_shutdown
- close_command_window
- fadeout_all
- SceneManager.exit
- end
- # [music]
- def play_title_music
- $data_system.title_bgm.play
- RPG::BGS.stop
- RPG::ME.stop
- end
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement