Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(450, 270, 190, 210)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.size = 14
- self.back_opacity = $game_system.window_opacity #**
- self.contents.font.bold = true
- self.contents.font.name = "Tahoma"
- @level_up_flags = [false, false, false, false]
- refresh
- end
- #--------------------------------------------------------------------------
- # * Dispose
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # * Set Level Up Flag
- # actor_index : actor index
- #--------------------------------------------------------------------------
- def level_up(actor_index)
- @level_up_flags[actor_index] = true
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- actor_y = i * 82 + 0
- draw_actor_name(actor, 47, actor_y + 4)
- draw_actor_hp(actor, 45, actor_y + 20, 100)
- draw_actor_sp(actor, 61, actor_y + 45, 100)
- draw_face(actor, 120, actor_y + 27)
- if @level_up_flags[i]
- self.contents.font.color = normal_color
- self.contents.draw_text(150, actor_y, 120, 32, "LEVEL UP!")
- else
- draw_actor_state(actor, 215, actor_y)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement