Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Window_Base < Window
- HP_BAR_STUFF = [0, WLH-4, 2] # //[x_offset, y_offset, height]
- MP_BAR_STUFF = [0, WLH-4, 2] # //[x_offset, y_offset, height]
- #--------------------------------------------------------------------------
- # * 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 = 120)
- gw = width * actor.hp / actor.maxhp
- gc1 = hp_gauge_color1
- gc2 = hp_gauge_color2
- self.contents.fill_rect(x + HP_BAR_STUFF[0], y + HP_BAR_STUFF[1],
- width, HP_BAR_STUFF[2], gauge_back_color)
- self.contents.gradient_fill_rect(x + HP_BAR_STUFF[0], y + HP_BAR_STUFF[1],
- gw, HP_BAR_STUFF[2], gc1, gc2)
- 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 = 120)
- gw = width * actor.mp / [actor.maxmp, 1].max
- gc1 = mp_gauge_color1
- gc2 = mp_gauge_color2
- self.contents.fill_rect(x + MP_BAR_STUFF[0], y + MP_BAR_STUFF[1],
- width, MP_BAR_STUFF[2], gauge_back_color)
- self.contents.gradient_fill_rect(x + MP_BAR_STUFF[0], y + MP_BAR_STUFF[1],
- gw, MP_BAR_STUFF[2], gc1, gc2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment