XP 스크립트

#==============================================================================
# ■ Game_Name
#------------------------------------------------------------------------------
#  Name
#==============================================================================

class Window_NameInput < Window_Base
  CHARACTER_TABLE =
  [
    "A","B","C","D","E",
    "F","G","H","I","J",
    "K","L","M","N","O",
    "P","Q","R","S","T",
    "U","V","W","X","Y",
    "Z"," "," "," "," ",
    "a","b","c","d","e",
    "f","g","h","i","j",
    "k","l","m","n","o",
    "p","q","r","s","t",
    "u","v","w","x","y",
    "z"," "," "," "," "
  ]
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 640, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @index = 0
    refresh
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● 문자의 취득
  #--------------------------------------------------------------------------
  def character
    return CHARACTER_TABLE[@index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0..179
      x = 4 + i / 5 / 9 * 152 + i % 5 * 28
      y = i / 5 % 9 * 32
      self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1)
    end
    self.contents.draw_text(544, 9 * 32, 64, 32, "ID등록완료", 1)
  end
  #--------------------------------------------------------------------------
  # ● 커서의 구형 갱신
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # 커서 위치가 [결정] 의 경우
    if @index >= 180
      self.cursor_rect.set(544, 9 * 32, 64, 32)
    # 커서 위치가 [결정] 이외의 경우
    else
      x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
      y = @index / 5 % 9 * 32
      self.cursor_rect.set(x, y, 28, 32)
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    # 커서 위치가 [결정] 의 경우
    if @index >= 180
      # 커서하
      if Input.trigger?(Input::DOWN)
        $game_system.se_play($data_system.cursor_se)
        @index -= 180
      end
      # 커서상
      if Input.repeat?(Input::UP)
        $game_system.se_play($data_system.cursor_se)
        @index -= 180 - 40
      end
    # 커서 위치가 [결정] 이외의 경우
    else
      # 방향 버튼의 오른쪽이 밀렸을 경우
      if Input.repeat?(Input::RIGHT)
        # 압하 상태가 리피트가 아닌 경우인가,
        # 커서 위치가 우단이 아닌 경우
        if Input.trigger?(Input::RIGHT) or
          @index / 45 < 3 or @index % 5 < 4
          # 커서를 오른쪽으로 이동
          $game_system.se_play($data_system.cursor_se)
          if @index % 5 < 4
            @index += 1
          else
            @index += 45 - 4
          end
          if @index >= 180
            @index -= 180
          end
        end
      end
      # 방향 버튼의 왼쪽이 밀렸을 경우
      if Input.repeat?(Input::LEFT)
        # 압하 상태가 리피트가 아닌 경우인가,
        # 커서 위치가 좌단이 아닌 경우
        if Input.trigger?(Input::LEFT) or
          @index / 45 > 0 or @index % 5 > 0
          # 커서를 왼쪽으로 이동
          $game_system.se_play($data_system.cursor_se)
          if @index % 5 > 0
            @index -= 1
          else
            @index -= 45 - 4
          end
          if @index < 0
            @index += 180
          end
        end
      end
      # 방향 버튼아래가 밀렸을 경우
      if Input.repeat?(Input::DOWN)
        # 커서를 아래에 이동
        $game_system.se_play($data_system.cursor_se)
        if @index % 45 < 40
          @index += 5
        else
          @index += 180 - 40
        end
      end
      # 방향 버튼 위가 밀렸을 경우
      if Input.repeat?(Input::UP)
        # 압하 상태가 리피트가 아닌 경우인가,
        # 커서 위치가 상단이 아닌 경우
        if Input.trigger?(Input::UP) or @index % 45 >= 5
          # 커서를 위에 이동
          $game_system.se_play($data_system.cursor_se)
          if @index % 45 >= 5
            @index -= 5
          else
            @index += 180
          end
        end
      end
      # L 버튼이나 R 버튼이 밀렸을 경우
      if Input.repeat?(Input::L) or Input.repeat?(Input::R)
        # 히라가나 / 카타카나 이동
        $game_system.se_play($data_system.cursor_se)
        if @index / 45 < 2
          @index += 90
        else
          @index -= 90
        end
      end
    end
    update_cursor_rect
  end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '2'
  • ?
    Krrrr7 2010.11.23 21:47

    에.. 히라가나 카타카나..?? 일본어..??

  • profile
    Tattoo 2011.01.26 04:42

    왜 오류나징  ㅜㅜ


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
561 메뉴 넷플레이 업그레이드됀 메뉴 스크립트 4 백호 2009.02.22 2040
560 저장 [KCG] 2 Pane Save Scene file 백호 2009.02.22 1128
559 저장 [KCG] 2 Pane Save Scene 번역본 백호 2009.02.22 1118
558 기타 광물캐기 스크립트 1 file 백호 2009.02.22 1850
557 기타 레벨, 능력치 무한 스크립트 3 백호 2009.02.22 1712
» 이름입력 영어 이름 입력기 2 백호 2009.02.22 1335
555 전투 SBABS v3 6 file 백호 2009.02.22 2046
554 기타 Book Event v2 by Bruth 5 백호 2009.02.22 1694
553 기타 레벨업시 전회복 by ccoa 8 백호 2009.02.22 2514
552 스킬 Trickster's Bag of Skill Effects file 백호 2009.02.22 1077
551 기타 메세지를 분출해 표시 백호 2009.02.22 1169
550 전투 전투의 커맨드에 따라 능력치를 상승 백호 2009.02.22 904
549 기타 스테이터스 표시 플러스 1.00ver 백호 2009.02.22 1141
548 기타 (T-RPG) 데미지 표시 시의 폰트를 설정 백호 2009.02.22 1348
547 기타 Crafting/Recipe system script by Axe Man Deke 백호 2009.02.22 829
546 기타 치트키 시스템 3 백호 2009.02.22 1594
545 기타 대화창 글자 한글자씩뜨는 스크립트 7 백호 2009.02.22 2185
544 메뉴 스테이터스 화면 from Harts Horn 2 백호 2009.02.22 1571
543 저장 Advanced Save System Edit (현재 맵을 보여주지 않음) file 백호 2009.02.22 1557
542 상태/속성 Custom stat growing system 1.0 by Blizzard@rmxp.org file 백호 2009.02.22 1088
Board Pagination Prev 1 ... 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ... 52 Next
/ 52