Code: |
if @command_window.index == 0 @selecteur.x = 37 @selecteur.y = 249 elsif @command_window.index == 2 @selecteur.x = 37 @selecteur.y = 289 elsif @command_window.index == 4 @selecteur.x = 37 @selecteur.y = 329 elsif @command_window.index == 6 @selecteur.x = 37 @selecteur.y = 369 end if @command_window.index == 1 @selecteur.x = 117 @selecteur.y = 249 elsif @command_window.index == 3 @selecteur.x = 117 @selecteur.y = 289 elsif @command_window.index == 5 @selecteur.x = 117 @selecteur.y = 329 end |
Code: |
if @command_window.index == 0 @selecteur.bitmap=RPG::Cache.picture("Curseur pokédex") elsif @command_window.index == 2 @selecteur.bitmap=RPG::Cache.picture("Curseur pokémon") elsif @command_window.index == 4 @selecteur.bitmap=RPG::Cache.picture("Curseur Sac") elsif @command_window.index == 6 @selecteur.bitmap=RPG::Cache.picture("Curseur Pokématos") end if @command_window.index == 1 @selecteur.bitmap=RPG::Cache.picture("Curseur CDD") elsif @command_window.index == 3 @selecteur.bitmap=RPG::Cache.picture("Curseur Save") elsif @command_window.index == 5 @selecteur.bitmap=RPG::Cache.picture("Curseur option") end |
Code: |
#============================================================================== # ■ Pokemon_Menu # Pokemon Script Project - Krosk # 18/07/07 # 22/02/10 - Palbolsky #----------------------------------------------------------------------------- # Scène modifiable #----------------------------------------------------------------------------- # Menu principal accessible par échap #----------------------------------------------------------------------------- module POKEMON_S class Pokemon_Menu < Window_Base #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index super(0,0,640,480) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 self.z = 11 end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def main @spriteset = Spriteset_Map.new @interface = Interface_Echap.new if POKEMON_S::VIEWER_TEAM @pkmn_team = Pokemon_Equipe.new end s1 = "POKéDEX" s3 = "POKéMON" s5 = "SAC" s7 = "" s2 = Player.name s4 = "SAUVER" s6 = "OPTIONS" s8 = "QUITTER" @command_window = Window_Command.new(80, [s1, s2, s3, s4, s5, s6, s7], $fontsizebig, 2, 14) @command_window.index = @menu_index @command_window.x = 480 - 169 - 123 + 200 @command_window.y = 28 - 20 @command_window.z = 10000 @command_window.visible = true @selecteur = Sprite.new @selecteur.z = 200 if $color_menu == 1 or $color_menu == nil # Vert @string = "_rouge" elsif $color_menu == 0 # Bleu @string = "_vert" elsif $color_menu == 2 # Rouge @string = "_bleu" end @selecteur.bitmap = RPG::Cache.picture("Menu Echap/selector_menu" + @string) if @command_window.index == 0 @selecteur.bitmap=RPG::Cache.picture("Curseur pokédex") elsif @command_window.index == 2 @selecteur.bitmap=RPG::Cache.picture("Curseur pokémon") elsif @command_window.index == 4 @selecteur.bitmap=RPG::Cache.picture("Curseur Sac") elsif @command_window.index == 6 @selecteur.bitmap=RPG::Cache.picture("Curseur Pokématos") end if @command_window.index == 1 @selecteur.bitmap=RPG::Cache.picture("Curseur CDD") elsif @command_window.index == 3 @selecteur.bitmap=RPG::Cache.picture("Curseur Save") elsif @command_window.index == 5 @selecteur.bitmap=RPG::Cache.picture("Curseur option") end if $pokemon_party.size == 0 # Enlève accès Equipe @command_window.disable_item(2) end if not($data_pokedex[0]) # Enlève accès Pokédex si non possédé @command_window.disable_item(0) end if $game_system.save_disabled @command_window.disable_item(5) end @command_window.disable_item(5) Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @spriteset.dispose @selecteur.dispose @interface.dispose @pkmn_team.dispose if @pkmn_team != nil end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def update if @command_window.index == 0 @selecteur.bitmap=RPG::Cache.picture("Curseur pokédex") elsif @command_window.index == 2 @selecteur.bitmap=RPG::Cache.picture("Curseur pokémon") elsif @command_window.index == 4 @selecteur.bitmap=RPG::Cache.picture("Curseur Sac") elsif @command_window.index == 6 @selecteur.bitmap=RPG::Cache.picture("Curseur Pokématos") elsif @command_window.index == 1 @selecteur.bitmap=RPG::Cache.picture("Curseur CDD") elsif @command_window.index == 3 @selecteur.bitmap=RPG::Cache.picture("Curseur Save") elsif @command_window.index == 5 @selecteur.bitmap=RPG::Cache.picture("Curseur option") end # ウィンドウを更新 @command_window.update @spriteset.update @selecteur.update @interface.update # コマンドウィンドウがアクティブの場合: update_command を呼ぶ if @command_window.active update_command return end end def dispose super end #-------------------------------------------------------------------------- # ● フレーム更新 (コマンドウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_command # B ボタンが押された場合 if Input.trigger?(Input::B) # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # マップ画面に切り替え $scene = Scene_Map.new self.contents.clear return end # C ボタンが押された場合 if Input.trigger?(Input::C) # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合 if $game_party.actors.size == 0 and @command_window.index < 4 # ブザー SE を演奏 $game_system.se_play($data_system.buzzer_se) return end # コマンドウィンドウのカーソル位置で分岐 case @command_window.index when 0 # Pokédex if not($data_pokedex[0]) $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokemon_Pokedex.new self.contents.clear when 2 # Menu if $pokemon_party.size == 0 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokemon_Party_Menu.new when 4 # Sac $game_system.se_play($data_system.decision_se) $scene = Pokemon_Item_Bag.new when 6 # Espace vide if $game_switches[9] == false $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokematos.new when 1 # Carte dresseur $game_system.se_play($data_system.decision_se) $game_temp.common_event_id = 19 $scene = Scene_Map.new when 3 # Sauvegarde if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokemon_Save.new self.contents.clear when 5 # OPTIONS $game_system.se_play($data_system.decision_se) $scene = OPTIONS.new end return end end end end |