Guest User

ChoiceList Position

a guest
Mar 1st, 2012
309
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Game_Interpreter
  2.   def last_event_code
  3.     @list[@index - 1].code
  4.   end
  5. end
  6.  
  7. class Window_ChoiceList < Window_Command
  8.     def update_placement
  9.     self.width = [max_choice_width + 12, 96].max + padding * 2
  10.     self.width = [width, Graphics.width].min
  11.     self.height = fitting_height($game_message.choices.size)
  12.     if last_event_code == 101
  13.       self.x = Graphics.width - width
  14.       if @message_window.y >= Graphics.height / 2
  15.         self.y = @message_window.y - height
  16.       else
  17.         self.y = @message_window.y + @message_window.height
  18.       end
  19.     else
  20.         self.x = 165
  21.         self.y = 120
  22.     end
  23.   end
  24. end
RAW Paste Data