자유게시판

#==============================================================================
# â–   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완폐남™ Views41204
    read more
  2. 디아블로식 체력 게이지

    Date2009.08.25 Category잡담 ByKNAVE Views1191
    Read More
  3. 유즈미님 저 질문좀..?

    Date2009.08.25 Category잡담 By칼리아 Views1073
    Read More
  4. 로고

    Date2009.08.25 Category잡담 ByKNAVE Views1378
    Read More
  5. 이벤트로 3d만들기

    Date2009.08.25 Category잡담 Byfgdr147 Views1265
    Read More
  6. 열기가 후끈 후끈 느껴지는..

    Date2009.08.25 Category잡담 ByKNAVE Views1101
    Read More
  7. 메가맨 혹은 록맨 스프라이트 사이트

    Date2009.08.25 Category잡담 By카르와푸딩의아틀리에 Views2609
    Read More
  8. 보스 패턴 두 번째 시간

    Date2009.08.25 Category잡담 By달표범 Views1535
    Read More
  9. 안녕하세요! 오늘 가입한 깐따삐야라고합니다.

    Date2009.08.25 Category가입 By깐따삐야 Views1725
    Read More
  10. 허걱님 이런식으루...

    Date2009.08.25 Category잡담 BySCUD Views1785
    Read More
  11. 라이네크님 부탁하신거

    Date2009.08.24 Category잡담 By봉시기 Views1397
    Read More
  12. 고전 와우 패러디

    Date2009.08.24 Category잡담 By달표범 Views1591
    Read More
  13. 그저 나의 간단한 일기

    Date2009.08.24 By하느님 Views1476
    Read More
  14. 달표범님 요거.

    Date2009.08.24 Category잡담 By카르와푸딩의아틀리에 Views1126
    Read More
  15. 괴도키드님 요런거?

    Date2009.08.24 Category잡담 By카르와푸딩의아틀리에 Views1385
    Read More
  16. 2연속 3등~

    Date2009.08.24 Category잡담 By칼리아 Views917
    Read More
  17. 커드스... 채색 다시해줌 @_@

    Date2009.08.24 Category잡담 BySCUD Views1023
    Read More
  18. 오라테 참고해서 해

    Date2009.08.24 Category잡담 BySCUD Views1252
    Read More
  19. 에잇 ㅠㅠ.. 완성본????

    Date2009.08.23 Category잡담 By봉시기 Views1052
    Read More
  20. 음... 키보드 그림 수정

    Date2009.08.23 Category잡담 BySkybound Views1568
    Read More
  21. 유즈미님 가르쳐주신대로 채색을 했더니......

    Date2009.08.23 Category잡담 BySCUD Views1634
    Read More
목록
Board Pagination Prev 1 ... 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 ... 755 Next
/ 755