Advertisement
diamondandplatinum3

Battle Menu At Top of Screen ~ RGSS3

Dec 10th, 2012
1,897
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.04 KB | None | 0 0
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. #             Battle Menu At Top of Screen
  3. #             Author: DiamondandPlatinum3
  4. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. #  Description:
  6. #
  7. #    This script puts the battle menu at the top of the screen rather than
  8. #    at the bottom where it normally is. It also moves the skill and items
  9. #    box below the battle menu, looks nicer in my opinion.
  10. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11.  
  12.  
  13.  
  14. #==============================================================================
  15. # ** Scene_Battle
  16. #------------------------------------------------------------------------------
  17. #  This class performs battle screen processing.
  18. #==============================================================================
  19.  
  20. class Scene_Battle < Scene_Base
  21.   #--------------------------------------------------------------------------
  22.   # * Create Information Display Viewport
  23.   #--------------------------------------------------------------------------
  24.   alias putwindowabove_civ_fjshr3 create_info_viewport
  25.   def create_info_viewport
  26.     # Call Original Method
  27.     putwindowabove_civ_fjshr3
  28.    
  29.     @info_viewport.rect.y = 0
  30.     @status_window.viewport = @info_viewport
  31.   end
  32. end
  33.  
  34.  
  35. #==============================================================================
  36. # ** Window_BattleSkill
  37. #------------------------------------------------------------------------------
  38. #  This window is for selecting skills to use in the battle window.
  39. #==============================================================================
  40.  
  41. class Window_BattleSkill < Window_SkillList
  42.   #--------------------------------------------------------------------------
  43.   # * Object Initialization
  44.   #     info_viewport : Viewport for displaying information
  45.   #--------------------------------------------------------------------------
  46.   def initialize(help_window, info_viewport)
  47.     y = (info_viewport.rect.height + help_window.height)
  48.     super(0, y, Graphics.width, (((info_viewport.rect.height + y) - (help_window.height + 16))))
  49.     self.visible = false
  50.     @help_window = help_window
  51.     @info_viewport = info_viewport
  52.   end
  53. end
  54.  
  55.  
  56.  
  57. #==============================================================================
  58. # ** Window_BattleItem
  59. #------------------------------------------------------------------------------
  60. #  This window is for selecting items to use in the battle window.
  61. #==============================================================================
  62.  
  63. class Window_BattleItem < Window_ItemList
  64.   #--------------------------------------------------------------------------
  65.   # * Object Initialization
  66.   #     info_viewport : Viewport for displaying information
  67.   #--------------------------------------------------------------------------
  68.   def initialize(help_window, info_viewport)
  69.     y = (info_viewport.rect.height + help_window.height)
  70.     super(0, y, Graphics.width, (((info_viewport.rect.height + y) - (help_window.height + 16))))
  71.     self.visible = false
  72.     @help_window = help_window
  73.     @info_viewport = info_viewport
  74.   end
  75. end
  76.  
  77.  
  78.  
  79. #==============================================================================
  80. # ** Window_Help
  81. #------------------------------------------------------------------------------
  82. #  This window shows skill and item explanations along with actor status.
  83. #==============================================================================
  84.  
  85. class Window_Help < Window_Base
  86.   #--------------------------------------------------------------------------
  87.   # * Object Initialization
  88.   #--------------------------------------------------------------------------
  89.   def initialize(line_number = 2)
  90.     if SceneManager.scene_is?(Scene_Battle)
  91.       super(0, 120, Graphics.width, fitting_height(line_number))
  92.     else
  93.       super(0, 0, Graphics.width, fitting_height(line_number))
  94.     end
  95.   end
  96. end
  97.  
  98.  
  99. #==============================================================================
  100. # ** Window_BattleLog
  101. #------------------------------------------------------------------------------
  102. #  This window is for displaying battle progress. No frame is displayed, but it
  103. # is handled as a window for convenience.
  104. #==============================================================================
  105.  
  106. class Window_BattleLog < Window_Selectable
  107.   #--------------------------------------------------------------------------
  108.   # * Object Initialization
  109.   #--------------------------------------------------------------------------
  110.   def initialize
  111.     super(0, Graphics.height - window_height, window_width, window_height)
  112.     self.z = 200
  113.     self.opacity = 0
  114.     @lines = []
  115.     @num_wait = 0
  116.     create_back_bitmap
  117.     create_back_sprite
  118.     refresh
  119.   end
  120.   #--------------------------------------------------------------------------
  121.   # * Get Maximum Number of Lines
  122.   #--------------------------------------------------------------------------
  123.   def max_line_number
  124.     return 4
  125.   end
  126. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement