질문과 답변

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 12456
RMVX 맵타일 수정 하고 싶은데 어떻게 하나여? 8 file fate아르토리아 2017.03.22 655
RMVX 맵타일 적용방법 9 휴지통 2014.02.01 844
RMVX 맵타일이 중간에서 끊기는 현상은 어떻게 해야 하나요? 2 file 위리리릴 2015.12.20 165
RMVX 멀티 메시지 스크립트에서 message_input_stop_mode로 분기 생성시 오류 2 file 톨톨 2012.11.08 1222
RMVX 멀티메시지MultiMessage 스크립트 한 이벤트에서 다분기 여러번 사용하기 1 톨톨 2013.02.28 602
RMVX 멀티메시지MultiMessage 스크립트에서 백로그 기능을 일시적으로 해제 시킬 수 있을까요? 1 톨톨 2013.02.28 708
RMVX 메뉴 관련 질문 4 anito 2013.01.07 702
RMVX 메뉴 금지 1 ba람이 2014.12.18 265
RMVX 메뉴 늘리는 법/자동저장/단축메뉴 1 천운 2010.10.27 1085
RMVX 메뉴 띄우는 스크립트할 때 커서들어오게하는 법이 없나요 2 unknown 2013.10.24 759
RMVX 메뉴 변경후 세이브 금지 오류 2 file 파루키아 2011.09.25 991
RMVX 메뉴 세이브 금지한 상태에서 okgeoym1215 2011.08.17 1115
RMVX 메뉴 스크립트 관련 오류입니다. 1 으아아 2014.01.07 1087
RMVX 메뉴 스크립트 뒤로가기요 2 제갈가롱 2011.06.03 1164
RMVX 메뉴 스크립트에 관하여 6 file karlen 2013.09.28 989
RMVX 메뉴 원래대로 돌리기 2 file 잡초더미 2012.05.18 2326
RMVX 메뉴 위치 정하기 3 file 아아방스임 2012.11.29 1339
RMVX 메뉴 조작 스크립트 변경방법에대해 궁금합니다 (스크립트 첨부) 2 file 으은 2013.05.01 690
RMVX 메뉴 캐릭터의 직업란을 안보이게 하고싶습니다. 6 file 가온하제 2017.02.12 170
RMVX 메뉴 커맨드 수정하려하는데 오류가떠요ㅠㅠ 안녕미미쨩 2013.06.07 931
Board Pagination Prev 1 ... 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ... 127 Next
/ 127