UltimaForum

Wsparcie [VX] - Usunięcie opcji Status.

Prometherion - Sro 23 Mar, 2011 10:17
Temat postu: Usunięcie opcji Status.
Cóż, prosiłbym o jeszcze jedną, ostatnią rzecz. Otóż, chciałbym usunąć w menu opcję Status, a informacje o ekwipunku i atrybutach, przenieść do głównego okna zaraz po wywołaniu Menu.

http://img607.imageshack....09/65029625.jpg

Ayene - Sro 23 Mar, 2011 13:12

Sprawdź to (wklej nad main ;-) ):
Spoiler:

Kod:
class Scene_Menu < Scene_Base 
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    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 skill
      @command_window.draw_item(2, false)     # Disable equipment
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(3, false)     # Disable save
    end
  end
 
  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 < 3
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 3
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2    # Skill, equipment
        start_actor_selection
      when 3      # Save
        $scene = Scene_File.new(true, false, false)
      when 4      # End Game
        $scene = Scene_End.new
      end
    end
  end
 
  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  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      end
    end
  end
end

class Window_MenuStatus < Window_Selectable
 
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 120, y)
      draw_actor_level(actor, x, y + WLH * 1)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1)
      draw_actor_mp(actor, x + 120, y + WLH * 2)
      draw_parameters(actor, 4, y + WLH * 4)
      draw_equipments(actor, 4, y + WLH * 9)
    end
  end
 
  def draw_parameters(actor, x, y)
    draw_actor_parameter(actor, x, y + WLH * 0, 0)
    draw_actor_parameter(actor, x, y + WLH * 1, 1)
    draw_actor_parameter(actor, x, y + WLH * 2, 2)
    draw_actor_parameter(actor, x, y + WLH * 3, 3)
  end
 
  def draw_equipments(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
    for i in 0..4
      draw_item_name(actor.equips[i], x + 16, y + WLH * (i + 1))
    end
  end 
end


Jeśli chcesz poustawiać inaczej te statystyki/ekwipunek to pokombinuj z linijkami:
Kod:
draw_parameters(actor, 4, y + WLH * 4)
draw_equipments(actor, 4, y + WLH * 9)

Pozdrawiam :->


Powered by phpBB modified by Przemo © 2003 phpBB Group