TheoAllen

Namebox Patch

Dec 29th, 2014
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.79 KB | None | 0 0
  1. class NameBox
  2.   #---------------------------------------------------------------------------
  3.   # * Update balloon placement
  4.   #---------------------------------------------------------------------------
  5.   def update_balloon_placement
  6.     self.y = screen_y_formula
  7.     if @right_side
  8.       self.x = @msg_window.x + Graphics.width - width - Buffer_X
  9.     else
  10.       self.x = @msg_window.x + Buffer_X
  11.     end
  12.   end
  13.   #---------------------------------------------------------------------------
  14.   # * Screen Y Formula
  15.   #---------------------------------------------------------------------------
  16.   def screen_y_formula
  17.     if @msg_window.y - self.height + Buffer_Y < 0
  18.       @msg_window.y + @msg_window.height - Buffer_Y
  19.     else
  20.       @msg_window.y - self.height + Buffer_Y
  21.     end
  22.   end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment