자유게시판

#==============================================================================
# â–   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 41182
잡담 한국인 여배우 수현이 어벤저스 2에 캐스팅됐다네요 8 file sudoxe 2014.03.05 1128
잡담 아무리봐도 3 금목걸이 2013.03.09 1128
잡담 서울대학교 연합전공 정보문화학 합격 9 file 달표범 2011.03.02 1128
가입 안녕하세요? 제 닉네임은 뉴비입니다. 잘 부탁 드립니다. 3 EE - newbie9 2009.08.04 1128
잡담 생신축하합니다 3 포뇨 2012.12.23 1127
잡담 시험 쳤는데 결과가 참 개촙포에버 2012.10.18 1127
잡담 인디 게임 더 무비, 라는 영화를 보신적 있으신가요? 7 file Lamancha 2013.05.19 1127
제작 스샷 핳하핳하ㅏ하하 10 file yellowcat 2013.05.05 1127
두번째마을 맵배치... 조언좀 많이해주세요 4 라이네크 2009.10.26 1127
잡담 광물 채집 시스템에 쓰일 그래픽 5 Skybound 2009.08.15 1127
아무래도, 몇달간은 아방스 활동하기 힘들듯.....ㅠㅜ 13 미루 2013.01.29 1126
잡담 아방스 자료실에서 다운이 안 되는건 왜 그렇죠? 1 MMM 2013.04.15 1126
발표 우수게임 심사위원활동을 다시 시작할렵니다. 1 Assault_Meteoric_Star 2012.08.20 1126
막장 하이퍼소닉의 흔한 락.swf 맛난호빵 2011.11.20 1126
잡담 ruby로만 만들어진 게임 3 이프 2009.11.05 1126
잡담 달표범님 요거. 2 카르와푸딩의아틀리에 2009.08.24 1126
잡담 to the moon 이라는 게임. 3 lolome 2012.12.05 1125
잡담 문뜩 생각난 포인트 제도... 4 아방스 2011.11.14 1125
잡담 RMVX도 해상도 640x480제한 없이 무한정 늘릴 수 있을것 같습니다 ^^; 13 카리스 2011.07.22 1125
가입 안녕하세요 3 닉네이므 2009.10.11 1125
목록
Board Pagination Prev 1 ... 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 ... 755 Next
/ 755