08-10-2013, 03:59 PM
Hi everyone !
I need to change meter style but I don't find a solution !
I want to make the meter graphic scrolling up and down. **By default it's right to left**
I try to change the direction in this part of script
I need to change meter style but I don't find a solution !
I want to make the meter graphic scrolling up and down. **By default it's right to left**
I try to change the direction in this part of script
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)
bar_x = HP_Pos_Adjust[0] + x
bar_y = HP_Pos_Adjust[1] + y + (Font.default_size * 2 /3)
@skin = RPG::Cache.windowskin(HP_Meter)
@width = @skin.width
@height = @skin.height / 3
src_rect = Rect.new(0, 0, @width, @height)
self.contents.blt(bar_x, bar_y, @skin, src_rect)
@line = (actor.hp == actor.maxhp ? 2 : 1)
@amount = actor.hp.to_f / actor.maxhp.to_f
src_rect2 = Rect.new(0, @line * @height, @width * @amount, @height)
self.contents.blt(bar_x, bar_y, @skin, src_rect2)
draw_actor_hp_bar(actor, x, y, width)
end