질문과 답변

Extra Form

사진에 보면 숫자가 크면 글씨랑 겹치게 되는데 그 숫자를 한칸 아래로 뛰어서 표시하는 방법이있을거같은데 스크립트를 볼줄 몰라서 이렇게 질문 올립니다.

스크립트 : #==============================================================================
# ■ Window_Fame
#------------------------------------------------------------------------------
#  메뉴 화면에서 명성치를 표시하는 윈도우입니다.
#==============================================================================
#http://rainsy.tistory.com
class Window_Fame < Window_Base
  #-----------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #-----------------------------------------------------------------------------
  def initialize(x, y)
#------------------------------------------------------------------------------
# ● 커스터마이즈
#------------------------------------------------------------------------------
    @ms = "헌터포인트"  # 입력된 문자가 표시됩니다.
    @var = 6            # 입력된 숫자가 명성치로 사용됩니다.
#------------------------------------------------------------------------------
    super(x, y, 160, WLH + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 120, 32, @ms)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4, 120, 32, sprintf("%d", $game_variables[@var]), 2)
  end
end

 

 

  #==============================================================================
  # ■ Scene_Menu
  #------------------------------------------------------------------------------
  # 메뉴 화면의 처리를 실시하는 클래스입니다.
  #==============================================================================
  class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     menu_index : 커멘드의 커서 초기 위치
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ● 개시 처리
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @fame_window = Window_Fame.new(0, 304)
  end
  #--------------------------------------------------------------------------
  # ● 종료 처리
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @fame_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    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(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # 파티 인원수가 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

 

이거인데 어떻게 바꿔야 숫자가 밑으로 내려갈까요? ㅠㅠ

Comment '2'
  • profile
    습작 2013.05.01 16:44

    class Window_Fame < Window_Base
      def initialize(x, y)
        @ms = "헌터포인트"
        @var = 6
        super(x, y - WLH, 160, WLH * 2 + 32)

        self.contents = Bitmap.new(width - 32, height - 32)
        refresh
      end
      def refresh
        self.contents.clear
        self.contents.font.color = system_color
        self.contents.draw_text(0, -4 + WLH, 120, 32, @ms)

        self.contents.font.color = normal_color
        self.contents.draw_text(0, -4, 120, 32, sprintf("%d", $game_variables[@var]), 2)
      end
    end


    수고하세요.^^
  • ?
    으은 2013.05.01 16:49
    감사합니다!!

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 21128
RMVX vx 상태를 추가하는 방법이 있는지요? file 피망군 2014.06.16 689
RMVX 저 점프 1 형준 2011.01.15 691
RMVX NPC의 범위인식문제 1 피망군 2014.03.27 691
RMVX 엘아르디아 게임 있으신분 있으신가요? 빡새 2014.06.22 691
RMVX 자동실행 도중 버튼이 켜지면 자동실행의 중단을 하고싶습니다. 2 하얀악어 2014.03.08 692
RMVX 메뉴위치 설정법 2 우롸이언 2013.02.15 693
RMVX 질문올립니다. 2 file 에드문드 2014.06.04 694
RMVX 게임을 제작시 스킬 추가를 하게되면 이전 세이브 파일에 스킬 추가가 적용이 안되요 6 빡새 2013.06.22 694
RMVX 그림이 나타나지 않고, 색변조가 되지 않습니다. 6 file 글쓰는상어 2013.06.27 694
RMVX 문장끝에 "x00" 가 멋대로 적힙니다.. 2 file 윌리스 2014.04.26 695
RMVX 레이어 타일E로 넣었는데 레이어A부분이 지워져요 7 케이와이 2014.03.05 695
RMVX [루비관련]값을 변수에 저장하고 띄우는 방법 파이어 2011.02.03 696
RMVX vx용케릭만들기사이트... fdsfsd 2011.02.16 696
RMVX 제작된 게임 실행화면 변경 7 file KingRynn 2013.05.02 696
RMVX rpg vx 아이콘 한칸의 크기 2 천둥번들 2014.12.20 696
RMVX 게임 실행되는 속도가 굉장히 늦습니다; 3 리드 2010.10.02 697
RMVX Requiem ABS 9 KIMj 2011.02.16 697
RMVX 글자나올때마다 소리나는 스크립트 사용중인데요 3 월유라 2013.08.08 697
RMVX vx말이죠... 1 file 아르케미스트 2011.01.13 699
RMVX 게임 안에 동영상을 넣고 싶은데요.. 1 개고기 2014.04.27 700
Board Pagination Prev 1 ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 ... 127 Next
/ 127