Ace 스크립트

#------------------------------------------------------------------------
# 물품 이름 컬러 변경 v1.0
#------------------------------------------------------------------------
# 2012-1-2 by 까까까
#
# <사용법>
#
# 메모 부분에
# 이름색:n
# 이라고 적어주면 n번에 해당하는 텍스트 컬러로 표시
#
# 텍스트 컬러란? 문장의 표시에 \c[n] 이라고 적어줄때
# 의 색과 같습니다.
#
#------------------------------------------------------------------------


class Window_Base < Window

 
  alias ggax3_draw_item_name draw_item_name

 
  def draw_item_name(item, x, y, enabled = true, width = 172)
    return unless item
   
    # 옵션이 적용되었다면 실행
    if item.note.scan(/이름색:([0-9]+)/i)[0] != nil
      new_color = text_color(item.note.scan(/이름색:([0-9]+)/i)[0][0].to_i)
      draw_icon(item.icon_index, x, y, enabled)
      change_color(new_color, enabled)
      draw_text(x + 24, y, width, line_height, item.name)
      change_color(normal_color, enabled)
   
    # 옵션이 적용되지 않았다면 기존 함수 실행
    else
      ggax3_draw_item_name(item, x, y, enabled, width)
   
    end
  end
 
end