Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # * Window_Base
- #===============================================================================
- class Window_Base
- #-----------------------------------------------------------------------------
- # * draw_actor_weight
- # Draws the actor's weight/capacity at given location
- #-----------------------------------------------------------------------------
- def draw_actor_weight(actor, x, y, width = 144)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, 'WT')
- color = actor.weight > actor.weight_capacity ? crisis_color : normal_color
- self.contents.font.color = color
- if width - 32 >= 108
- wt_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- wt_x = x + width - 48
- flag = false
- end
- self.contents.draw_text(wt_x, y, 48, 32, actor.weight.to_s, 2)
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(wt_x + 48, y, 12, 32, '/', 1)
- self.contents.draw_text(wt_x + 60, y, 48, 32, actor.weight_capacity.to_s)
- end
- end
- end
- #===============================================================================
- # * Window_MenuStatus
- #===============================================================================
- class Window_MenuStatus
- #-----------------------------------------------------------------------------
- # * refresh
- # Draws each actor's weight/capacity on the menu
- #-----------------------------------------------------------------------------
- alias item_weight_refresh refresh
- def refresh
- item_weight_refresh
- $game_party.actors.each_index {|i|
- draw_actor_weight($game_party.actors[i], 300, i * 116) }
- end
- end
Add Comment
Please, Sign In to add comment