자유게시판

#==============================================================================
# â–   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 40545
잡담 허걱님 이런식으루... 5 SCUD 2009.08.25 1785
잡담 라이네크님 부탁하신거 2 봉시기 2009.08.24 1397
잡담 고전 와우 패러디 달표범 2009.08.24 1591
그저 나의 간단한 일기 4 하느님 2009.08.24 1476
잡담 달표범님 요거. 2 카르와푸딩의아틀리에 2009.08.24 1126
잡담 괴도키드님 요런거? 5 카르와푸딩의아틀리에 2009.08.24 1385
잡담 2연속 3등~ 칼리아 2009.08.24 912
잡담 커드스... 채색 다시해줌 @_@ 2 SCUD 2009.08.24 1023
잡담 오라테 참고해서 해 SCUD 2009.08.24 1252
잡담 에잇 ㅠㅠ.. 완성본???? 9 봉시기 2009.08.23 1052
잡담 음... 키보드 그림 수정 1 Skybound 2009.08.23 1568
잡담 유즈미님 가르쳐주신대로 채색을 했더니...... 2 SCUD 2009.08.23 1634
잡담 Lonely General 깐지 2009.08.23 959
잡담 몬스터 도감 속성표시까지 완료. ㅎㅎ 5 카르와푸딩의아틀리에 2009.08.23 1417
잡담 없어질만한데... えらい☆初音ミク 2009.08.23 899
미치갯따 ㅠㅠ 2 えらい☆初音ミク 2009.08.23 1080
경고 델파이기반 프로그램 감염 2 아기공군둘리 2009.08.23 1207
잡담 괴도키드님, 주문하신 이미지 닉네임 완료! 1 칼리아 2009.08.23 1095
잡담 난 솔직히 이쪽 그리는게 취향임.. 2 SCUD 2009.08.23 1948
잡담 도전과제에 대한 질문입니다. 깐지 2009.08.23 916
목록
Board Pagination Prev 1 ... 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 ... 758 Next
/ 758