Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #================================================================
- #Astuce Menu by Zouzaka
- #================================================================
- #Nom de la nouvelle commande
- New_Cmd = "Crédits"
- #Position X de la fenetre
- PosX = 0
- #Position Y de la fenetre
- PosY = 0
- #Pour ajouter un text
- Text = ["Ligne 1","Ligne 2"]
- class Window_TitleCommand
- def update_placement
- self.x = PosX
- self.y = PosY
- end
- alias :old_make_command_list :make_command_list
- def make_command_list
- old_make_command_list
- add_command(New_Cmd, :astuce)
- end
- end
- class Scene_Title
- alias :old_create_command_window :create_command_window
- def create_command_window
- old_create_command_window
- @command_window.set_handler(:astuce, method(:command_astuce))
- @window_credit = Window_Base.new(Graphics.width/4,0,Graphics.width/2,Graphics.height)
- @window_credit.openness = 0
- end
- def command_astuce
- close_command_window
- @window_credit.open
- Text.each{|t| @window_credit.contents.draw_text(0, 25*Text.index(t), 190, 25, t)}
- end
- def update
- super
- if @window_credit.open? && (Input.press?(:C) or Input.press?(:B))
- Sound.play_cancel
- @window_credit.close
- @command_window.open ; @command_window.activate
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement