Le Deal du moment : -23%
EVGA SuperNOVA 650 G6 – Alimentation PC 100% ...
Voir le deal
77.91 €

Aller en bas
Dudu'
Staffeux retraité

Nombre de messages : 2060
Date d'inscription : 22/06/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Lun 18 Jan 2010 - 10:11
oki bah passe moi ça par mp alors parce que j'ai msn qui plante sans arret en ce moment!!!
merci d'avence
kain188
kain188
Membre

Nombre de messages : 22
Age : 45
Localisation : Quebec,Canada
Distinction : aucune
Date d'inscription : 16/01/2010

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Lun 18 Jan 2010 - 12:46
ruijin a écrit:Ok mais il faut le mettre ou le script Smile ...

Je sais je fais le noob la x)

Je ne voudrais pas parraitre méchant mais...
Comment peux-tu avoir posté 200 messages sur le forum et encore ignorer un truc pareil ? XD

J'ai le meme probleme dès que j'ouvre mon projet Sad

Menu Option Plus V 1.5 [By Adurna] - Page 2 Grim1
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Lun 18 Jan 2010 - 19:59
bon la si ça fonctionne pas je veux bien me faire pape et manger le Bescherelle que balb' à voler pour moi!!!

Code:

#=================================================================#
#                      By Adurna                                                        12/12/09        maj:18/01/10        #
#                                          menu option plus version 1.0                                                        #
#=================================================================#

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
module Adurna
 
 
Obj = "Objet"
Comp = "Compétence"
Equip = "Equiper"
Stat = "Statut"
Sov = "Sauvegarder"
Char = "Charger"
Fin = "Quiter"


Or = "Or"
Location ="Location :"

Affiche_Icon=1
Icon_Or=147
Icon_Loc=153
Icon_Obj=144
Icon_Comp=128
Icon_Equip=32
Icon_Stat=118
Icon_Sov=176
Icon_Char=177
Icon_Fin=117

end

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
  create_menu_background
    create_command_window
    @location_window = Window_location.new(0, 240)
    @status_window=0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @location_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
  update_menu_background
    @command_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 = [Adurna::Icon_Obj, Adurna::Obj]
    s2 = [Adurna::Icon_Comp, Adurna::Comp]
    s3 = [Adurna::Icon_Equip, Adurna::Equip]
    s4 = [Adurna::Icon_Stat, Adurna::Stat]
    s5 = [Adurna::Icon_Sov, Adurna::Sov]
    s6 = [Adurna::Icon_Char, Adurna::Char]
    s7=  [Adurna::Icon_Fin, Adurna::Fin]
  @command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s7])
    @command_window.index = @menu_index
   
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item(4,false)    # Disable save
    end
    if Dir.glob('Save*.rvdata').size <=0
      @command_window.draw_item(5,false)
    end
   
   
    if Adurna::Fac_Balb_Active != 1         
      @command_window.draw_item(6, false)
      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
      elsif Dir.glob('Save*.rvdata').size <=0 and @command_window.index == 5
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        @status_window=Window_MenuStatus.new(160, 0)
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
      when 7      # End Game
        $scene = Scene_End.new
      end
    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
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
def update_actor_selection
      @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
    @status_window.visible = false
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end








class Window_location < Window_Base
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @map_name = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, Adurna::Location)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4+WLH, 128, 32, @map_name, 1)
    draw_icon(Adurna::Icon_Loc,0, WLH, true)
    self.contents.font.color = system_color
    self.contents.draw_text(125, -4, 128, 32, Adurna::Or,1)
    self.contents.font.color = normal_color
    self.contents.draw_text(125, -10+WLH, 140, 42, $game_party.gold, 1)
    draw_icon(Adurna::Icon_Or,235, WLH, true)
  end
end




class Window_IconCommand < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 7, spacing = 20)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = commands
    @item_max = commands.size
    @column_max = column_max
    refresh
    self.index = 0
  end
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end



mwoila mwoila bon comme toujours toute idée d'amélioration et la bien venue!!!
Azuma-01
Azuma-01
Membre

Nombre de messages : 94
Age : 31
Localisation : Amos
Distinction : aucune
Date d'inscription : 22/09/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Lun 18 Jan 2010 - 20:36
tu va devoir te mettre a table Adurna Twisted Evil

1- Adurna::Fac_Balb_Active, Cette constante est pas initialiser
2- lorsque l'on reviens de la scène de chargement en appuyant sur Input::B, le curseur se positionne sur sauvegarde (je t'es déjà proposer une solution pour ça)

Omis ces détails il ne manque plus que quelques commentaires et même un newbie pourra l'utiliser. Bon travail.
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Lun 18 Jan 2010 - 21:00
oki ça marche alors j'ai donc j'ai pas du poster la bonne mise à jour
1-
1- Adurna::Fac_Balb_Active, Cette constante est pas initialiser
en aifait un oublie de suppression s'est une variable que j'utilise pour le gétinaire de village ->voire dans la thématique de recherche!!!
2- ça j'avais trouver une autre solution mais...
et pour les commentaire il va falloir attendre très très très [...] très long temps je met jamais de commentaire car d'une je me retrouve mieux dans mon code sans commentaire(oui je sais s'est bizarre, même sur des programme en C de 6000 ligne de codes j'ai jamais mis de commentaire) et de deux ça me soule et j'ai jamais sut expliqué correctement!!!
alors désolé pour les commentaire mais s'est vraiment pas le truc de prévu au menu
bon je vais bouffé le Bescherelle que balb' m'a donné (sauf que vous prouve lui demander confirmation il m'en à pas donner finalement) et pour me faire pape s'est pas possible vu que je suis athée et qu'un age minimum et requis!!!
Azuma-01
Azuma-01
Membre

Nombre de messages : 94
Age : 31
Localisation : Amos
Distinction : aucune
Date d'inscription : 22/09/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Lun 18 Jan 2010 - 21:35
je viens juste d'y trouver une erreur d'inattention
Code:
      when 7      # End Game
l'index de quiter, dans ton menu, est 6.
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Mar 2 Fév 2010 - 15:25
nouvelle version:
Code:
Menu_sw=1
Obj_sw=1
Comp_sw=1
Equip_sw=1
Stat_sw=1
Sov_sw=1
Char_sw=1
Fin_sw=1
il suffit de passé ses variable à une autre valeur que 1 pour que l'option qui lui correspond soi inutilisable


Code:


#=================================================================#
#                      By Adurna                                                        12/12/09        maj:16/12/09        #
#                                          menu option plus version 0.5                                                        #
#=================================================================#

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
module Adurna
 
 
Obj = "Objet"
Comp = "Compétence"
Equip = "Equiper"
Stat = "Statut"
Sov = "Sauvegarder"
Char = "Charger"
Fin = "Quiter"

Or = "Or"
Location ="Location :"

Affiche_Icon=1
Icon_Or=147
Icon_Loc=153
Icon_Obj=144
Icon_Comp=128
Icon_Equip=32
Icon_Stat=118
Icon_Sov=176
Icon_Char=177
Icon_Fin=117

Menu_sw=1
Obj_sw=1
Comp_sw=1
Equip_sw=1
Stat_sw=1
Sov_sw=1
Char_sw=1
Fin_sw=1

end

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
  create_menu_background
    create_command_window
    @location_window = Window_location.new(0, 240)
    @status_window=0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @location_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
  update_menu_background
    @command_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 = [Adurna::Icon_Obj, Adurna::Obj]
    s2 = [Adurna::Icon_Comp, Adurna::Comp]
    s3 = [Adurna::Icon_Equip, Adurna::Equip]
    s4 = [Adurna::Icon_Stat, Adurna::Stat]
    s5 = [Adurna::Icon_Sov, Adurna::Sov]
    s6 = [Adurna::Icon_Char, Adurna::Char]
    s7=  [Adurna::Icon_Fin, Adurna::Fin]
  @command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s7])
    @command_window.index = @menu_index
 
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item(4,false)    # Disable save
    end
    if Dir.glob('Save*.rvdata').size <=0
      @command_window.draw_item(5,false)
    end
if Adurna::Menu_sw != 1
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
      @command_window.draw_item(4,false)
      @command_window.draw_item(5,false)
      @command_window.draw_item(6,false)
end
 
if Adurna::Obj_sw != 1
      @command_window.draw_item(0, false)
end

if Adurna::Comp_sw != 1
      @command_window.draw_item(1, false)
end

if Adurna::Equip_sw != 1
      @command_window.draw_item(2, false)
end

if Adurna::Stat_sw != 1
      @command_window.draw_item(3, false)
end

if Adurna::Sov_sw != 1
      @command_window.draw_item(4, false)
end
 
if Adurna::Char_sw != 1
      @command_window.draw_item(5, false)
end

if Adurna::Fin_sw != 1
      @command_window.draw_item(6, false)
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
      elsif Dir.glob('Save*.rvdata').size <=0 and @command_window.index == 5
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        @status_window=Window_MenuStatus.new(160, 0)
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
      when 6      # End Game
        $scene = Scene_End.new
      end
    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
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
def update_actor_selection
      @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
    @status_window.visible = false
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end








class Window_location < Window_Base
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @map_name = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, Adurna::Location)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4+WLH, 128, 32, @map_name, 1)
    draw_icon(Adurna::Icon_Loc,0, WLH, true)
    self.contents.font.color = system_color
    self.contents.draw_text(125, -4, 128, 32, Adurna::Or,1)
    self.contents.font.color = normal_color
    self.contents.draw_text(125, -10+WLH, 140, 42, $game_party.gold, 1)
    draw_icon(Adurna::Icon_Or,235, WLH, true)
  end
end




class Window_IconCommand < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 7, spacing = 20)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = commands
    @item_max = commands.size
    @column_max = column_max
    refresh
    self.index = 0
  end
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end


Code:
Menu_sw=1
Obj_sw=1
Comp_sw=1
Equip_sw=1
Stat_sw=1
Sov_sw=1
Char_sw=1
Fin_sw=1
ZangtherOld
ZangtherOld
Membre

Nombre de messages : 1711
Date d'inscription : 07/08/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Mar 2 Fév 2010 - 20:40
Sympa ce menu, dommage que j'ai dja trouvé le mien ^^
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Mer 3 Fév 2010 - 13:55
merci s'est sympa
et s'est pas fini je vais continuer à l'améliorer!!!
Contenu sponsorisé

Menu Option Plus V 1.5 [By Adurna] - Page 2 Empty Re: Menu Option Plus V 1.5 [By Adurna]

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum