TheoAllen

Contoh window selectable + help

Oct 5th, 2014
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.67 KB | None | 0 0
  1. class Window_CustomCommand < Window_Command
  2.  
  3.   def initialize
  4.     super(0,0)
  5.   end
  6.  
  7.   def make_command_list
  8.     add_command("Command 1", :cmd1)
  9.     add_command("Command 2", :cmd2)
  10.     add_command("Command 3", :cmd3)
  11.   end
  12.  
  13.   def update_help
  14.     @help_window.contents.clear
  15.     rect = @help_window.contents.rect
  16.     @help_window.draw_text(rect, "Ini index nomor #{index}", 1)
  17.   end
  18.  
  19. end
  20.  
  21. DataManager.init
  22. def updates
  23.   Graphics.update
  24.   Input.update
  25.   @selectable.update
  26.   @help.update
  27. end
  28.  
  29. @selectable = Window_CustomCommand.new
  30. @help = Window_Base.new(0, Graphics.height - 48, Graphics.width, 48)
  31.  
  32. @selectable.help_window = @help
  33. updates while true
Advertisement
Add Comment
Please, Sign In to add comment