자유게시판

#==============================================================================
# â–   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


  1. 아방스 게시물 · 댓글 작성 규칙 (최근 수정일 2015.11.25)

    Date2012.07.17 Category공지 By완폐남™ Views41184
    read more
  2. 만우절이라고 장난 카톡,문자가 너무 많이와서 짜증나네요.

    Date2014.04.01 Category잡담 Bymindviewer Views1132
    Read More
  3. 랄프 공장

    Date2009.10.10 Category잡담 By카르와푸딩의아틀리에 Views1131
    Read More
  4. 헐 글리젠 쩌는듯

    Date2009.12.05 Category잡담 ByEvangelista Views1131
    Read More
  5. 상품권이나 기프티콘 좋아하세요~?

    Date2010.04.07 Category잡담 By세상입니다 Views1131
    Read More
  6. ☆★☆★☆국산 압축프로그램 추천.txt☆★☆★☆

    Date2011.08.05 Category잡담 By맛난호빵 Views1131
    Read More
  7. 알만툴 관련 구글링 중 예쁜 그림 발견...

    Date2013.11.06 Category잡담 ByBunny_Boy Views1131
    Read More
  8. 비평은 걸러 들어서 내 것으로 소화 시킵시다.

    Date2014.03.26 Category잡담 By진솔새옷 Views1131
    Read More
  9. 채색?ㅋ

    Date2009.10.20 Category잡담 By완폐남™ Views1130
    Read More
  10. pixiv 소설란이라든가 fanfiction.net 같은 사이트 둘러보면....

    Date2012.07.03 Category잡담 ByAlkaid Views1129
    Read More
  11. 서울대학교 연합전공 정보문화학 합격

    Date2011.03.02 Category잡담 By달표범 Views1128
    Read More
  12. 아무리봐도

    Date2013.03.09 Category잡담 By금목걸이 Views1128
    Read More
  13. 한국인 여배우 수현이 어벤저스 2에 캐스팅됐다네요

    Date2014.03.05 Category잡담 Bysudoxe Views1128
    Read More
  14. 난이도 하향이 필요할까요...

    Date2014.03.13 Category잡담 By위키니트러 Views1128
    Read More
  15. 광물 채집 시스템에 쓰일 그래픽

    Date2009.08.15 Category잡담 BySkybound Views1127
    Read More
  16. 인디 게임 더 무비, 라는 영화를 보신적 있으신가요?

    Date2013.05.19 Category잡담 ByLamancha Views1127
    Read More
  17. 시험 쳤는데 결과가 참

    Date2012.10.18 Category잡담 By개촙포에버 Views1127
    Read More
  18. 생신축하합니다

    Date2012.12.23 Category잡담 By포뇨 Views1127
    Read More
  19. 달표범님 요거.

    Date2009.08.24 Category잡담 By카르와푸딩의아틀리에 Views1126
    Read More
  20. ruby로만 만들어진 게임

    Date2009.11.05 Category잡담 By이프 Views1126
    Read More
  21. 아방스 자료실에서 다운이 안 되는건 왜 그렇죠?

    Date2013.04.15 Category잡담 ByMMM Views1126
    Read More
목록
Board Pagination Prev 1 ... 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 ... 457 Next
/ 457