VX 스크립트

메뉴
2009.02.07 17:35

GuiRPG menu시스템

조회 수 4849 추천 수 0 댓글 13
Atachment
첨부 '1'

이런식의메뉴입니다.
   

#----------------------------------------------------------------
#----------------------------------------------------------------
#                        Menu GuiRPG 1.0
#----------------------------------------------------------------
# Criado por: GuiRPG - Guilherme Santiago
# Versão: 1.0
#  
# Esse Script faz uma pequena modificação no Menu, deixando o
# Menu mais clássico, cobrindo toda a tela e mostrando informações
# Adicionais como Mapa e Tempo de Jogo
#
# Fórum: rpgmakertotal.ipbfree.com
#
# MSN: guilhermesantiagosilva@hotmail.com
#
#----------------------------------------------------------------



class Scene_Menu < Scene_Base
  
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  
  def start
    super
    create_menu_background
    create_command_window
    @status_window = Window_MenuStatus.new(0, 80)
    @window_local = Window_Local.new(120,416)
    @time = Window_Time.new(360,416)
    @gold_window = Window_Gold2.new(0, 416)
  end
  
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @window_local.dispose
    @time.dispose
    @gold_window.dispose
  end
  
  def update
    super
    update_menu_background
    @command_window.update
    @status_window.update
    @gold_window.update
    @window_local.update
    @time.update

    @window_local.y -= 5
    if @window_local.y <= 366
      @window_local.y = 366
    end
    @time.y -= 5
    if @time.y <= 366
      @time.y = 366
    end
    @gold_window.y -= 5
    if @gold_window.y <= 366
      @gold_window.y = 366
    end
    
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6],3)
    @command_window.index = @menu_index
    if $game_party.members.size == 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            
      @command_window.draw_item(4, false)    
    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 < 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    
        $scene = Scene_Item.new
      when 1,2,3  
        start_actor_selection
      when 4      
        $scene = Scene_File.new(true, false, false)
      when 5      
        $scene = Scene_End.new
      end
    end
  end

  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

  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  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  
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3  
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

class Window_MenuStatus < Window_Selectable
  
  def initialize(x, y)
    super(x, y, 544, 288)
    @column_max = 2
    refresh
    self.active = false
    self.index = -1
  end

  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      x = actor.index % @column_max * self.width/2 + 96
      y = actor.index / @column_max * 96 + WLH / 2
      draw_actor_face(actor, x - 96, y, 92)
      draw_actor_name(actor, x, y)
      draw_actor_level(actor, x + 80, y)
      draw_actor_hp(actor, x , y + WLH * 1)
      draw_actor_mp(actor, x , y + WLH * 2 - 6)
    end
  end
  
  def update_cursor
    case @index
    when -1
      self.cursor_rect.empty
    when 0, 1, 2, 3
      self.cursor_rect.set(@index % @column_max * self.width/2 - 4, index / @column_max * 96 + WLH / 2 - 4, self.width / 2 - 32 +4, 96+4)
    else
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
   attr_reader   :map_id
   def namemap  
     $name_map = load_data("Data/MapInfos.rvdata")
     $name_map[@map_id].name
   end
end

class Window_Local < Window_Base
  
    def initialize(x,y)
    super(x, y, 240, WLH + 26)
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 200, 32, "Local:")
    self.contents.font.color = normal_color
    self.contents.draw_text(59, -8, 210, 32, $game_map.namemap.to_s)
end
end

class Window_Gold2 < Window_Base
  
  def initialize(x, y)
    super(x, y, 120, WLH + 26)
    refresh
  end
    
  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 6, -4, 80)
  end
end

class Window_Time < Window_Base
  
  def initialize(x, y)
    super(x, y, 184, WLH + 26)
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 200, 32, "Tempo:")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(69, -8, 200, 32, text)
  end
  
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
Comment '13'
  • ?
    쿠쿠. 2009.02.07 23:44
    그닥...
  • ?
    할렘 2009.02.08 11:26
    저도 마음에 안들지만 없는메뉴시스템이라서 그냥 올려뒀습니다.
  • ?
    허걱 2009.02.08 17:16
    전 맘에 드는데요...1인용 메뉴로 살짝 바꿔서 써도 될듯...감사합니다~
  • ?
    백년술사 2009.02.10 18:12
    맘에 들긴하지만...
    그..뭐라해야나...
    순서...?같은게 제가 원하는게 아니라...ㄳ합니다.
  • ?
    Man.... 2009.02.17 21:52
    스클크립트가 다  이쪽으로이동했네...
  • ?
    드랍 2009.06.06 12:47
    좋긴 한데 스텟배분이 없어져서...
  • ?
    mymy 2009.11.14 19:40

    드랍님 말듣고 고개돌린 1ㅅ

    이유:내게임은 스킬장착,스텟배분등등이있어서

  • ?
    VX MANIA 2010.01.29 11:19

    별 좋진 않은듯...

    하지만 약간 좋다.

  • ?
    엑셀 2010.07.23 09:35

    좋기는 좋내요...

  • ?
    포인트팡팡 2010.07.23 09:35
    축하합니다. 엑셀님은 50포인트에 당첨되셨습니다
  • ?
    김브레이커 2010.07.28 13:50

    오오 좋네요.. 만들고 있는 게임에 적용시켰습니다.

    좋은 자료 감사합니다. ㅇㅂㅇ

  • ?
    구제가능 2011.07.24 12:37

    Local 부분만 없애고 적용시켰음

  • ?
    조총병 2011.09.22 20:08

    좋습니다!


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
44 메뉴 확장 스테이터스 화면 - KGC 23 file 카르와푸딩의아틀리에 2009.08.19 5057
43 메뉴 헬프 윈도우 중앙표시 스크립트 11 file 양념통닼 2008.06.10 3348
42 메뉴 파이날 판타지 IX 메뉴. 12 file 할렘 2009.02.06 6286
41 메뉴 커서 모양 바꾸는 스크립트 16 아방스 2009.01.20 3959
40 메뉴 캐릭터설명을 심플하게! 스크립트. 13 file 할렘 2009.02.03 4848
39 메뉴 창 크기 변경 스크립트 6 file Incubus 2008.05.25 5945
38 메뉴 지난 메뉴 스크립트에 이은 스테이터스 스크립트! 5 file 독사 2008.06.29 3545
37 메뉴 전투승리시 아이템 경험치팝업창 스크립트 18 file 카르와푸딩의아틀리에 2009.06.23 3760
36 메뉴 전투결과 상세 표시 스크립트 24 file 카르와푸딩의아틀리에 2009.07.07 4143
35 메뉴 전투 결과 팝업 스크립트 12 file 카르와푸딩의아틀리에 2009.06.30 3381
34 메뉴 전투 결과 상세 표시 스크립트 (한글화) 15 file 강진수 2010.02.26 3344
33 메뉴 자작 메뉴 스크립트 for VX(L's Simple Custom Menu VX ver.) 5 Alkaid 2010.09.02 4705
32 메뉴 일본에서 만든 멋있는메뉴변경 스크립트 (한글 VX에서 쓰시면 자동으로 바뀜) 45 유칸지 2008.04.09 8861
31 메뉴 윈도우창 크기 조절 스크립트 0.3 5 아방스 2008.01.30 3038
30 메뉴 윈도우 색변경 스크립트 7 file 비극ㆍ 2010.03.01 2598
29 메뉴 시스템 옵션 스크립트의 사용방법 6 아방스 2009.06.04 2834
28 메뉴 스테이터스 화면 개조 - 커스텀 버전 13 file 훈덕 2009.06.15 4932
27 메뉴 스테이터스 창을 멋있게 쿨하게~!전신을 보여주자. 24 file 할렘 2009.02.06 6236
26 메뉴 스타일 크로노 트리거 메뉴 31 file 콩밥 2010.07.19 4536
25 메뉴 몬스터도감(유즈미짱님의엘카르디아같은종류) 1 작은샛별 2010.03.07 4201
Board Pagination Prev 1 2 3 Next
/ 3