Bigace360

draw_actor_state[rmxp]

Apr 21st, 2012
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.44 KB | None | 0 0
  1. class Window_Base < Window
  2.     def draw_icon(icon_index, x, y, enabled = true)
  3.         bitmap = RPG::Cache.state($data_states[icon_index].name)
  4.         self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), enabled ? 255 : 128)
  5.     end
  6.     def draw_actor_state(actor, x, y, width = 96)
  7.         count = 0
  8.         actor.states.sort!
  9.         actor.states.each do |state|
  10.             draw_icon(state, x + 24 * count, y+4)
  11.             count += 1
  12.             break if (24 * count > width - 24)
  13.         end
  14.     end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment