Advertisement
AlliedG

Untitled

Feb 6th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. # )----------------------------------------------------------------------------(
  2. # )-- AUTHOR: Mr. Trivel --(
  3. # )-- NAME: Status Screen Bust && Data --(
  4. # )-- CREATED: 2014-12-07 --(
  5. # )----------------------------------------------------------------------------(
  6. # )-- CHANGES --(
  7. # )-- Moved around how stats are displayed and added hero bust to status. --(
  8. # )----------------------------------------------------------------------------(
  9. # )-- INSTRUCTIONS --(
  10. # )-- Bust pictures are in Graphics/Pictures folder named Bust(ID), where --(
  11. # )-- ID is actor ID. E.g.: Bust1.png, Bust999.png --(
  12. # )----------------------------------------------------------------------------(
  13. # )-- LICENSE INFO --(
  14. # )-- Allowed to use for commercial and non-commercial projects and games --(
  15. # )-- developed by AlliedG. --(
  16. # )----------------------------------------------------------------------------(
  17.  
  18. # )====------------------------------------------------------------------------(
  19. # )-- Class: Window_Status --(
  20. # )-------------------------------------------------------------------------===(
  21. class Window_Status < Window_Selectable
  22.  
  23. alias :mrts_ws_bm_initialize :initialize
  24. def initialize(actor)
  25. @sprite = Sprite.new
  26. mrts_ws_bm_initialize(actor)
  27. @sprite.viewport = @viewport
  28. @sprite.z = 1000
  29. end
  30.  
  31. def dispose
  32. super
  33. @sprite.bitmap.dispose
  34. @sprite.dispose
  35. end
  36.  
  37. # )--------------------------------------------------------------------------(
  38. # )-- Overwritten Method: refresh +line_height*2 --(
  39. # )--------------------------------------------------------------------------(
  40. def refresh
  41. contents.clear
  42. x = 16
  43. y = 4
  44. draw_actor_name(@actor, x, y +line_height*1 )
  45. draw_text(x + 105, y +line_height*1 , 300, line_height, "LV #{@actor.level}")
  46. draw_actor_hp(@actor, x, y + line_height * 2)
  47. draw_actor_mp(@actor, x, y + line_height * 3)
  48. draw_parameters(x, y + line_height * 5)
  49. draw_exp_info(x, y + line_height * 10)
  50.  
  51. @sprite.bitmap = Cache.picture("Bust#{@actor.id}")
  52. @sprite.x = contents.width - @sprite.bitmap.width - 4
  53. @sprite.y = contents.height - @sprite.bitmap.height + 2
  54. end
  55.  
  56. # )--------------------------------------------------------------------------(
  57. # )-- Overwritten Method: draw_exp_info --(
  58. # )--------------------------------------------------------------------------(
  59. def draw_exp_info(x, y)
  60. s1 = @actor.max_level? ? "-------" : @actor.exp
  61. s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
  62. s_next = sprintf(Vocab::ExpNext, Vocab::level)
  63. change_color(system_color)
  64. draw_text(x, y, 180, line_height, Vocab::ExpTotal)
  65. draw_text(x, y + line_height, 180, line_height, s_next)
  66. change_color(normal_color)
  67. draw_text(x, y, 180, line_height, s1, 2)
  68. draw_text(x, y + line_height, 180, line_height, s2, 2)
  69. end
  70.  
  71. # )--------------------------------------------------------------------------(
  72. # )-- Overwritten Method: standard_padding --(
  73. # )--------------------------------------------------------------------------(
  74. def standard_padding
  75. return 0
  76. end
  77. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement