자유게시판

#==============================================================================
# â–   SephirothSpawn's Slanted bars in VX
#     25.4.2008
#------------------------------------------------------------------------------
#  Script by: Kylock (Based on SephirothSpawn's Original Slanted Bars)
#==============================================================================
#    Inspired by Syvkal (http://rmvxpuniverse.com) who ported Cogwheel Style
#  bars to VX, I realized how much I missed Seph's Slanted Bars.  So here they
#  are.  Just add this script and it'll automagically transform your HP and MP
#  bars.  Bar colors are easily customized in the following module.
#==============================================================================
#  Change Log
#  1.0 - Original Release.
#  1.1 - Added option to use default window skin colors.
#==============================================================================

module SLANT_BARS
  USE_WINDOWSKIN = false  # If set to true, the colors will be taken from the
                          #  current system skin and the following settings
                          #  will be ignored.
 
  DEFAULT_HP_BAR_COLOR = Color.new(208,48,65,255)    # Beginning color of HP bar
  DEFAULT_HP_END_COLOR = Color.new(231,185,94,255)# Ending color of HP bar
 
  DEFAULT_MP_BAR_COLOR = Color.new (38,47,187,255)  # Begenning color of MP bar
  DEFAULT_MP_END_COLOR = Color.new(153,57,204,255) # Ending color of MP bar
end

class Window_Base < Window
  #==========================================================================
  # * Draw Slant Bar(by SephirothSpawn)
  #==========================================================================
  def draw_slant_bar(x, y, min, max, width = 152, height = 6,
    bar_color = Color.new(150, 0, 0, 255),
    end_color = Color.new(255, 255, 60, 255))
    # Draw Border
    for i in 0..height
      self.contents.fill_rect(x + i, y + height - i, width + 1, 1,
        Color.new(50, 50,50, 255))
    end
    # Draw Background
    for i in 1..(height - 1)
      r = 78 * (height - i) / height + 0 * i / height
      g = 29 * (height - i) / height + 0 * i / height
      b = 1 * (height - i) / height + 0 * i / height
      a = 255 * (height - i) / height + 255 * i / height
      self.contents.fill_rect(x + i, y + height - i, width, 1,
        Color.new(r, b, g, a))
    end
    # Draws Bar
    for i in 1..( (min / max.to_f) * width - 1)
      for j in 1..(height - 1)
        r = bar_color.red * (width - i) / width + end_color.red * i / width
        g = bar_color.green * (width - i) / width + end_color.green * i / width
        b = bar_color.blue * (width - i) / width + end_color.blue * i / width
        a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
        self.contents.fill_rect(x + i + j, y + height - j, 1, 1,
          Color.new(r, g, b, a))
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw HP gauge
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_hp_gauge(actor, x, y, width = 131)
    if SLANT_BARS::USE_WINDOWSKIN
      draw_slant_bar(x-3,y+13,actor.hp,actor.maxhp,width,8,
        hp_gauge_color1,hp_gauge_color2)
    else
      draw_slant_bar(x-3,y+13,actor.hp,actor.maxhp,width,8,
        SLANT_BARS::DEFAULT_HP_BAR_COLOR,SLANT_BARS::DEFAULT_HP_END_COLOR)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw MP Gauge
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_mp_gauge(actor, x, y, width = 131)
    if SLANT_BARS::USE_WINDOWSKIN
      draw_slant_bar(x-3,y+13,actor.mp,actor.maxmp,width,8,
        mp_gauge_color1,mp_gauge_color2)
    else
      draw_slant_bar(x-3,y+13,actor.mp,actor.maxmp,width,8,
        SLANT_BARS::DEFAULT_MP_BAR_COLOR,SLANT_BARS::DEFAULT_MP_END_COLOR)
    end
  end
end

 

TAG •

Who's 카르와푸딩의아틀리에

profile

엘카르디아 제작자 (현재 MV로 리메이크중)

유튜브

https://www.youtube.com/channel/UCMwirNTR-pOEzJNB0jL3y_g

트위터

https://twitter.com/karsis98

블로그

https://blog.naver.com/karsis98


List of Articles
분류 제목 글쓴이 날짜 조회 수
공지 아방스 게시물 · 댓글 작성 규칙 (최근 수정일 2015.11.25) 17 file 완폐남™ 2012.07.17 41201
잡담 추석 끝났네요. 1 secret ★찜찜 2008.09.17 1
걸음수에 대한 질문, 답변해주실 분 없습니까? secret 도심 2010.08.07 1
잡담 비밀글 1 secret 칼리아 2010.08.25 1
서버 제공에 관한 글입니다.. secret bradly1 2008.09.06 3
완폐남님 확인해주십시오. 4 secret 시트르산 2010.12.06 3
그냥 새로 만들고 있는 맵.... 1 secret 은색바람 2010.08.14 4
아방스님만... 2 secret 독도2005 2008.08.31 5
(아방스님만) 서버 지원에 관한 내용 2 secret 독도2005 2008.09.01 5
잡담 해당글은 삭제 처리되었습니다. [아이디 정지 처리] 4 secret 유리지 2010.07.06 15
가입 안녕하세요 처음 가입한 뉴비입니다. 1 알만툴뉴비 2024.09.19 16
잡담 크리스마스까지 2주도 안 남았네요... 레기우스州 2020.12.12 22
잡담 나는 용사다 이말이야5편을 만들고 있는데.... 레기우스州 2020.08.31 23
잡담 RPGBoss에 시스템 메세지 관련 한글화에 대하여. nimi070 2018.11.19 23
잡담 정신을 차려보니 file JACKY 2024.09.18 23
테라파일 건들지말아주세요 ^^;; 2 secret e. 2010.12.12 26
잡담 [나는 용사다 이말이야VIII]완성작 내보내기 전에 프리퀼 작품을 우선적으로 내보낼까... 레기우스州 2020.12.12 29
잡담 [한국콘텐츠진흥원, 한국문화관광연구원] 게임업계 프리랜서 대상 심층인터뷰 참여자 모집 안내 cono92 2022.11.14 29
잡담 2번째 닉변이요~ 레기우스州 2020.08.25 30
잡담 EDGE쓰는데 글자가 깨지네요.... 알비노 2020.09.08 30
잡담 MV에는 수정 아이콘이 빠졌네요? 잠행인 2016.02.02 31
목록
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 755 Next
/ 755