Code: |
#============================================================================== # ■ Pokemon_Menu # Pokemon Script Project DS - Palbolsky # 22/02/10 #----------------------------------------------------------------------------- # Scène modifiable #----------------------------------------------------------------------------- # Interface graphique du menu principal accessible par échap #----------------------------------------------------------------------------- class Interface_Echap < Window_Base include POKEMON_S def initialize super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize self.opacity = 0 self.z = 21 @interface = Sprite.new @interface.x = 13 @interface.y = 227 @interface.z = 20 text_interface apparence refresh id = $pokemon_party.actors[0].id @img = Sprite.new @img.bitmap = RPG::Cache.battler("Icon/"+sprintf("%03d",id)+".png") @img.x = 260 @img.y = 272 @img.z = 0 end def dispose super @interface.dispose end def apparence if $options[1] == 1 or $options[1] == nil # Vert @string = "_vert" elsif $options[1] == 0 # Bleu @string = "_bleu" elsif $options[1] == 2 # Rouge @string = "_rouge" end end def refresh if $pokemon_party.size > 0 @interface.bitmap = RPG::Cache.picture("Menu Echap/menu echap2" + @string) else @interface.bitmap = RPG::Cache.picture("Menu Echap/menu echap1" + @string) end if $data_pokedex[0] == true @interface.bitmap = RPG::Cache.picture("Menu Echap/menu echap3" + @string) end if $game_switches[9] == true @interface.bitmap = RPG::Cache.picture("Menu Echap/menu echap" + @string) end end def text_interface draw_text_interface(55, 260, 50, 25, "POKéDEX", 1) draw_text_interface(55, 300, 50, 25, "POKéMON", 1) draw_text_interface(55, 340, 50, 25, "SAC", 1) draw_text_interface(140, 260, 70, 25, Player.name, 1) draw_text_interface(145, 300, 50, 25, "SAUVER", 1) draw_text_interface(145, 340, 50, 25, "OPTIONS", 1) end end |
Code: |
id = $pokemon_party.actors[0].id @img = Sprite.new @img.bitmap = RPG::Cache.battler("Icon/"+sprintf("%03d",id)+".png") |
Code: |
id = ($pokemon_party.actors.size>0 ? $pokemon_party.actors[0].id : nil) @img = Sprite.new @img.bitmap = RPG::Cache.battler("Icon/"+sprintf("%03d",id)+".png") rescue nil |