08-12-2013, 03:20 AM
Well, I guess you couldn't rotate THAT windowskin. So.....
Added this value:
And here's the revision:
The true/false value I added lets the hearts fill from the bottom up, or top down. :)
And with this model, you can adjust the others.
Added this value:
Code:
HP_Meter_Fill = falseAnd here's the revision:
Code:
#--------------------------------------------------------------------------
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_hp_bar draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
# Set Bar Position
bar_x = HP_Pos_Adjust[0] + x
bar_y = HP_Pos_Adjust[1] + y + (Font.default_size * 2 /3)
# Acquire bar image and dimensions
bar_img = RPG::Cache.windowskin(HP_Meter)
bar_width = bar_img.width
bar_height = bar_img.height / 3
# Define source rectangle for bar
src_rect = Rect.new(0, 0, bar_width, bar_height)
self.contents.blt(bar_x, bar_y, bar_img, src_rect)
# Determine which line used in bar image
self.contents.blt(bar_x, bar_y, bar_img, src_rect)
# Determine which line used in bar image
bar_line = (actor.hp == actor.maxhp) ? 2 : 1
# Calculate value to adjust drawn line
bar_start = bar_line * bar_height
bar_amount = bar_height * (actor.hp.to_f / actor.maxhp.to_f)
# Decide if fill from top or bottom
diff = (HP_Meter_Fill) ? 0 : bar_height - bar_amount
# Adjust dimensions of destination rectangle
src_rect2 = Rect.new( 0, bar_start+diff, bar_width, bar_amount)
# Draw the bar with the new Rectangle area
self.contents.blt(bar_x, bar_y+diff, bar_img, src_rect2)
# Perform the original call
draw_actor_hp_bar(actor, x, y, width)
endThe true/false value I added lets the hearts fill from the bottom up, or top down. :)
And with this model, you can adjust the others.

![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)