Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ++ Customize the Title Screen [VX] ver. 1.00 ++
- # Script by Para Dog
- # Translated by RTAgent5
- # http://2d6.parasite.jp/
- #------------------------------------------------------------------------------
- # Use a picture on the menu to change the appearance on the window.
- #==============================================================================
- module PARA_TITLE_CUSTOM
- # Use images for the menu command ( true / false )
- IMG_MENU = true
- #↓---Commands used to set the menu---
- # Menu image filename ( Graphics/System )
- #( Pictures required - When the command is not selected, and a pic of when the command is selected ] )
- # New Game:
- IMG_NEWGAME = ["New Adventure","New AdventureA"]
- IMG_NEWGAME_X = 160 # Horizontal position
- IMG_NEWGAME_Y = 200 # Vertical position
- # Continue:
- IMG_CONTINUE = ["Continue Adventure","Continue AdventureA"]
- IMG_CONTINUE_X = 200 # Horizontal position
- IMG_CONTINUE_Y = 230 # Vertical position
- # Shutdown:
- IMG_SHUTDOWN = ["Quit","QuitA"]
- IMG_SHUTDOWN_X = 240 # Horizontal position
- IMG_SHUTDOWN_Y = 260 # Vertical position
- # Continue Disabled ( 0:Semi-transparent / 1:Specify image )
- LOAD_DISABLED_TYPE = 1
- # Images of the disabled continue:
- IMG_CONTINUE_DISABLED = ["Continue Adventure","Continue AdventureB"]
- # How to synthetic image: ( 0:Usually / 1:Plus / 2:Subtraction )
- BLEND_TYPE = 0
- #↓---Images not used for the command menu---
- # Hide panel ( true / false )
- WINDOW_TRANS = false
- # Window Transparency
- WINDOW_OPACITY = 160
- # Window size:
- WINDOW_WIDTH = 172
- # Location of the window ( 0:Specify coordinate / 1:Left / 2:Middle / 3:Right )
- WINDOW_ALIGN = 2
- # "Coordinates designated" position next to the window:
- WINDOW_POS_X = 0
- # The vertical position of the window ( 0:Specify coordinate / 1:Left / 2:Middle / 3:Right )
- WINDOW_VALIGN = 0
- # "Coordinates specified" window of time ordinate
- WINDOW_POS_Y = 288
- end
- # ↑ 設定項目ここまで
- #------------------------------------------------------------------------------
- #==============================================================================
- # ■ Scene_Title
- #==============================================================================
- class Scene_Title < Scene_Base
- #--------------------------------------------------------------------------
- # ● Create a command window
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = Vocab::new_game
- s2 = Vocab::continue
- s3 = Vocab::shutdown
- w = PARA_TITLE_CUSTOM::WINDOW_WIDTH
- @command_window = Window_Command.new(w, [s1, s2, s3])
- @command_window.x = (544 - @command_window.width) / 2
- @command_window.y = 288
- if @continue_enabled # If a valid continue
- @command_window.index = 1 # Set the cursor
- else # If you disable
- @command_window.draw_item(1, false) # Command to display the menu semi-transparent
- end
- @command_window.openness = 0
- # Use image for command window
- if PARA_TITLE_CUSTOM::IMG_MENU
- # Hide command window
- @command_window.opacity = 0
- @command_window.contents_opacity = 0
- create_img_command_window
- else
- change_window_visual
- end
- @command_window.open
- end
- #--------------------------------------------------------------------------
- # ● Set the command window appearance
- #--------------------------------------------------------------------------
- def change_window_visual
- # ウィンドウの透明度
- if PARA_TITLE_CUSTOM::WINDOW_TRANS
- @command_window.opacity = 0
- else
- @command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY
- end
- # ウィンドウの位置を指定
- case PARA_TITLE_CUSTOM::WINDOW_ALIGN
- when 0
- @command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X
- when 1
- @command_window.x = 0
- when 2
- @command_window.x = ( 544 - @command_window.width ) / 2
- when 3
- @command_window.x = 544 - @command_window.width
- end
- case PARA_TITLE_CUSTOM::WINDOW_VALIGN
- when 0
- @command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y
- when 1
- @command_window.y = 0
- when 2
- @command_window.y = ( 416 - @command_window.height ) / 2
- when 3
- @command_window.y = 416 - @command_window.height
- end
- end
- #--------------------------------------------------------------------------
- # ○ Creating images of the command window
- #--------------------------------------------------------------------------
- def create_img_command_window
- # Sprite Generation
- sprite1 = Sprite.new
- sprite1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X
- sprite1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y
- sprite1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
- sprite2 = Sprite.new
- sprite2.x = PARA_TITLE_CUSTOM::IMG_CONTINUE_X
- sprite2.y = PARA_TITLE_CUSTOM::IMG_CONTINUE_Y
- sprite2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
- sprite3 = Sprite.new
- sprite3.x = PARA_TITLE_CUSTOM::IMG_SHUTDOWN_X
- sprite3.y = PARA_TITLE_CUSTOM::IMG_SHUTDOWN_Y
- sprite3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
- # In the management SUPURAITOSETTO
- @command_sprites = [sprite1, sprite2, sprite3]
- # BITTOMAPPUFAIRU managed by an array of names
- @command_bitmaps = [PARA_TITLE_CUSTOM::IMG_NEWGAME, PARA_TITLE_CUSTOM::IMG_CONTINUE, PARA_TITLE_CUSTOM::IMG_SHUTDOWN]
- if @continue_enabled # If a valid continue
- select_img_item(1) # Set the cursor
- else # If you disable
- case PARA_TITLE_CUSTOM::LOAD_DISABLED_TYPE
- when 0 # Translucent continue Disabled
- @command_sprites[1].opacity = 160
- when 1 # When continue is disabled
- @command_bitmaps[1] = PARA_TITLE_CUSTOM::IMG_CONTINUE_DISABLED
- end
- select_img_item(0) # Set the cursor
- end
- end
- #--------------------------------------------------------------------------
- # ● Frame Update
- #--------------------------------------------------------------------------
- def update
- super
- @command_window.update
- if PARA_TITLE_CUSTOM::IMG_MENU
- if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
- # Image change
- select_img_item(@command_window.index)
- end
- end
- if Input.trigger?(Input::C)
- case @command_window.index
- when 0 # New Game
- command_new_game
- when 1 # Continue
- command_continue
- when 2 # Shut down
- command_shutdown
- end
- end
- end
- #--------------------------------------------------------------------------
- # ○ When switching the image menu selections
- #--------------------------------------------------------------------------
- def select_img_item(index)
- case index
- when 0
- @command_sprites[0].bitmap = Cache.system(@command_bitmaps[0][1])
- @command_sprites[1].bitmap = Cache.system(@command_bitmaps[1][0])
- @command_sprites[2].bitmap = Cache.system(@command_bitmaps[2][0])
- when 1
- @command_sprites[0].bitmap = Cache.system(@command_bitmaps[0][0])
- @command_sprites[1].bitmap = Cache.system(@command_bitmaps[1][1])
- @command_sprites[2].bitmap = Cache.system(@command_bitmaps[2][0])
- when 2
- @command_sprites[0].bitmap = Cache.system(@command_bitmaps[0][0])
- @command_sprites[1].bitmap = Cache.system(@command_bitmaps[1][0])
- @command_sprites[2].bitmap = Cache.system(@command_bitmaps[2][1])
- end
- end
- #--------------------------------------------------------------------------
- # ● The release of the command window
- #--------------------------------------------------------------------------
- def dispose_command_window
- @command_window.dispose
- if @command_sprites != nil
- @command_sprites[0].dispose
- @command_sprites[1].dispose
- @command_sprites[2].dispose
- end
- end
- #--------------------------------------------------------------------------
- # ● Open a command window
- #--------------------------------------------------------------------------
- def open_command_window
- # Hidden behind the window when you see the moment
- if PARA_TITLE_CUSTOM::WINDOW_TRANS
- @command_window.openness = 255
- end
- @command_window.open
- begin
- @command_window.update
- Graphics.update
- end until @command_window.openness == 255
- end
- #--------------------------------------------------------------------------
- # ● Close the command window
- #--------------------------------------------------------------------------
- def close_command_window
- # Hidden behind the window closed when not to
- if not(PARA_TITLE_CUSTOM::WINDOW_TRANS)
- @command_window.close
- begin
- @command_window.update
- Graphics.update
- end until @command_window.openness == 0
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement