Advertisement
TheSixth

Control Configuration System - Title Command Addon

Jul 4th, 2017
2,331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.34 KB | None | 0 0
  1. #===============================================================================
  2. # * [ACE] Control Configuration System - Title Command Addon
  3. #===============================================================================
  4. # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
  5. # * Version: 1.0
  6. # * Updated: 05/07/2017
  7. # * Requires: -------
  8. #-------------------------------------------------------------------------------
  9. # * < Change Log >
  10. #-------------------------------------------------------------------------------
  11. # * Version 1.0 (05/07/2017)
  12. #   - Initial release.
  13. #-------------------------------------------------------------------------------
  14. # * < Description >
  15. #-------------------------------------------------------------------------------
  16. # * Just a small script to add the control configuration menu to the title
  17. #   commands.
  18. #===============================================================================
  19. #===============================================================================
  20. # Settings:
  21. #===============================================================================
  22. module System
  23.   #-----------------------------------------------------------------------------
  24.   # Title Command Settings:
  25.   #-----------------------------------------------------------------------------
  26.   # These settings will adjust how the command button for the control
  27.   # configuration menu will show up on the title screen.
  28.   #
  29.   # The settings are self-explanatory.
  30.   #
  31.   # As an extra info, you might wanna know that the :index can be set to
  32.   # positive or negative numbers alike. If positive (including 0), the position
  33.   # will be counted from the top of the command list, if negative, it will be
  34.   # counted from the bottom of the list.
  35.   # So, 0 means that it will be the first command, 1 means that it will be the
  36.   # second command, and so on, but -1 means that it will be the last command on
  37.   # the list, -2 means that it will be the second to last, and so on.
  38.   #-----------------------------------------------------------------------------
  39.   Title = {
  40.     :show => true,       # Show or not? true = show, false = don't show.
  41.     :name => "Controls", # Name of the command button.
  42.     :index => -2,        # Placement of the command button.
  43.   }
  44.  
  45. end
  46. #===============================================================================
  47. # End of Settings! Editing anything below may lead to... you know it, right?
  48. #===============================================================================
  49.  
  50. class Window_TitleCommand < Window_Command
  51.  
  52.   alias add_control_cmd1232 make_command_list
  53.   def make_command_list
  54.     add_control_cmd1232
  55.     return unless System::Title[:show]
  56.     cmd = {
  57.       :name => System::Title[:name], :symbol=> :controls,
  58.       :enabled => true, :ext => nil
  59.     }
  60.     @list.insert(System::Title[:index],cmd)
  61.   end
  62.  
  63. end
  64.  
  65. class Scene_Title < Scene_Base
  66.  
  67.   alias add_control_cmd9826 create_command_window
  68.   def create_command_window
  69.     add_control_cmd9826
  70.     @command_window.set_handler(:controls, method(:controls_menu))
  71.   end
  72.  
  73.   def controls_menu
  74.     SceneManager.call(ConfScene)
  75.   end
  76.  
  77. end
  78. #==============================================================================
  79. # !!END OF SCRIPT - OHH, NOES!!
  80. #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement