Voyageur Lv.10
Age : 34 Inscrit le : 12/02/2009 Messages : 469
| Sujet: Scene Menu revisité by LightNox Lun 19 Mar 2012 - 21:20 | |
| Nom du script :Scene Menu revisité by LightNox Auteur : LightNox Description rapide / Fonction : Ce script change le menu In Game qui intègre l'option Continuer et en enlève d'autre - Code:
-
#============================================================================== # ** Scene_Menu revisité by Lightnox pour marcherfu #------------------------------------------------------------------------------ # This class performs the menu screen processing. #==============================================================================
class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super load_database check_continue create_menu_background create_command_window @gold_window = Window_Gold.new(0, 360) @status_window = Window_MenuStatus.new(160, 0) end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @command_window.dispose @gold_window.dispose @status_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background @command_window.update @gold_window.update @status_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::item s2 = Vocab::equip s3 = Vocab::continue s4 = Vocab::save s5 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5]) @command_window.index = @menu_index if $game_party.members.size == 0 # If number of party members is 0 @command_window.draw_item(0, false) # Disable item @command_window.draw_item(1, false) # Disable equipment end if $game_system.save_disabled # If save is forbidden @command_window.draw_item(4, false) # Disable save end end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # Item $scene = Scene_Item.new when 1 #, equipment start_actor_selection when 2 command_continue when 3 # Save $scene = Scene_File.new(true, false, false) when 4 # End Game $scene = Scene_End.new end end end #-------------------------------------------------------------------------- def load_database $data_actors = load_data("Data/Actors.rvdata") $data_classes = load_data("Data/Classes.rvdata") $data_skills = load_data("Data/Skills.rvdata") $data_items = load_data("Data/Items.rvdata") $data_weapons = load_data("Data/Weapons.rvdata") $data_armors = load_data("Data/Armors.rvdata") $data_enemies = load_data("Data/Enemies.rvdata") $data_troops = load_data("Data/Troops.rvdata") $data_states = load_data("Data/States.rvdata") $data_animations = load_data("Data/Animations.rvdata") $data_common_events = load_data("Data/CommonEvents.rvdata") $data_system = load_data("Data/System.rvdata") $data_areas = load_data("Data/Areas.rvdata") end #------------------------------------------------------------------------- def check_continue @continue_enabled = (Dir.glob('Save*.rvdata').size > 0) end #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue if @continue_enabled Sound.play_decision $scene = Scene_File.new(false, false, false) else Sound.play_buzzer end end #-------------------------------------------------------------------------- # * Start Actor Selection #-------------------------------------------------------------------------- def start_actor_selection @command_window.active = false @status_window.active = true if $game_party.last_actor_index < @status_window.item_max @status_window.index = $game_party.last_actor_index else @status_window.index = 0 end end #-------------------------------------------------------------------------- # * End Actor Selection #-------------------------------------------------------------------------- def end_actor_selection @command_window.active = true @status_window.active = false @status_window.index = -1 end #-------------------------------------------------------------------------- # * Update Actor Selection #-------------------------------------------------------------------------- def update_actor_selection if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 # equipment $scene = Scene_Equip.new(@status_window.index) end end end end
Explications pour le fonctionnement / Informations : -A mettre au dessous de Materiels -appuyez sur echap en jeu xD Screen : |
|
Voyageur Lv.10
Age : 34 Inscrit le : 12/02/2009 Messages : 469
| Sujet: Re: Scene Menu revisité by LightNox Mar 24 Avr 2012 - 16:14 | |
| Je voudrais savoir si mon petit script de menu revisité va être accepter ? x) |
|
Citadin Lv.7
Age : 26 Inscrit le : 19/11/2010 Messages : 182
| Sujet: Re: Scene Menu revisité by LightNox Mar 24 Avr 2012 - 17:40 | |
| L'option continuer, c'est chargé ? Et tu as viré Statut, alors que c'est un sous menu important (: Simplement rajouter l'option serait mieu, mais en supprimer, non. |
|
Voyageur Lv.10
Age : 34 Inscrit le : 12/02/2009 Messages : 469
| Sujet: Re: Scene Menu revisité by LightNox Mar 24 Avr 2012 - 17:50 | |
| ben... c'etait pour une demande d'un des membres du forum donc... mais je peut toujours le refaire ^^ et ouai l'option continuer => charger ^^ pour changer continuer il suffi juste d'aller dans la BDD>lexique et de changer continuer par charger |
|
Invité
| Sujet: Re: Scene Menu revisité by LightNox Mer 11 Juil 2012 - 12:20 | |
| Bon, je place cela dans bac à sable, ça peut toujours servir. Merci et bonne continuation ! |
|
| Sujet: Re: Scene Menu revisité by LightNox | |
| |
|