IceDragon200

Window_ChoiceCommand

Jul 8th, 2011
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.46 KB | None | 0 0
  1. class Window_ChoiceCommand < Window_Command
  2.  
  3.   def command(index=self.index) ; return @commands[index] ; end
  4.    
  5.   def refresh
  6.     self.height = 80
  7.     create_contents()
  8.     for i in 0...@item_max
  9.       draw_item(i)
  10.     end
  11.     @last_index = -1
  12.   end
  13.  
  14.   def update
  15.     super
  16.     if self.index != @last_index
  17.       self.contents.draw_text(0, 24, self.contents.width, 24, @command[self.index])
  18.       @last_index = self.index
  19.     end  
  20.   end  
  21.  
  22. end
Advertisement
Add Comment
Please, Sign In to add comment