IceDragon200

Pop Text Interpreter calls

Mar 14th, 2012
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.01 KB | None | 0 0
  1. # // 02/03/2012
  2. # // 02/03/2012
  3. class Hash
  4. # // IceDragon
  5.   def get_values(*args)
  6.     args.collect {|a|self[a]}
  7.   end
  8. end  
  9.  
  10. class Game_Interpreter
  11.   include NEL
  12.   def nel_textpop(*args)
  13.     if(args[0].is_a?(Hash))
  14.       text, ev_id, time, size, color = args[0].get_values(:text,:event_id,:time,:size,:color)
  15.     else
  16.       text, ev_id, time, size, color = *args
  17.     end
  18.     char = get_character(ev_id || 0)
  19.     return unless(char)
  20.     char.namepop_size = size  || DEF_TEXT_SIZE
  21.     char.namepop_color= color || DEF_TEXT_COLOR
  22.     char.namepop_time = time  || 60
  23.     char.namepop      = text  || ""
  24.   end
  25.   def nel_change_font(*args)
  26.     if(args[0].is_a?(Hash))
  27.       ev_id, font, bold, ital = args[0].get_values(:event_id,:font,:bold,:italic)
  28.     else
  29.       ev_id, font, bold, ital = *args
  30.     end
  31.     char = get_character(ev_id || 0)
  32.     return unless(char)
  33.     char.namepop_font = font || DEF_TEXT_FONT
  34.     char.namepop_bold = !!bold # // Convert to Bool
  35.     char.namepop_ital = !!ital
  36.   end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment