TheoAllen

Req - Menu Help

Nov 14th, 2013
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.74 KB | None | 0 0
  1. module Theo
  2.   module MHelp
  3.    
  4.     List = {
  5.     # "Command name" => "Help text"
  6.    
  7.     "Items"     => "Show your inventory",
  8.     "Skills"    => "Show actor skill",
  9.     "Equipment" => "Change actor equipment",
  10.     "Status"    => "Show actor status",
  11.     "Formation" => "Arrange Party",
  12.     "Save"      => "Save Game",
  13.     "Game End"  => "End the game"
  14.    
  15.     }
  16.    
  17.   end
  18. end
  19.  
  20. class Window_MenuCommand < Window_Command
  21.  
  22.   def update_help
  23.     @help_window.set_text(Theo::MHelp::List[command_name(index)])
  24.   end
  25.  
  26. end
  27.  
  28. class Scene_Menu < Scene_MenuBase
  29.  
  30.   alias theo_mhelp_start start
  31.   def start
  32.     theo_mhelp_start
  33.     @menu_help = Window_Help.new(1)
  34.     @command_window.help_window = @menu_help
  35.   end
  36.  
  37. end
Advertisement
Add Comment
Please, Sign In to add comment