vindaca510

V's Simple: Command Text Indent v0.1

Apr 23rd, 2014
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.72 KB | None | 0 0
  1. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  2. # #
  3. # V's Simple: #
  4. # Command Text Indent #
  5. # Version 0.1 #
  6. # #
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  8. # Written By: Vindaca #
  9. # Concept By: Lexietanium #
  10. # Last Edited: April 23, 2014 #
  11. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  12. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  13.  
  14.  
  15. #==============================================================================#
  16. #------------------------------------------------------------------------------#
  17. # ** Disclaimer #
  18. #------------------------------------------------------------------------------#
  19. # #
  20. # This script was intended for Non-commercial use only, if you wish to use #
  21. # this script in a commercial game please PM me at which ever site you found #
  22. # this script. Either way please give me credit in your game script as the #
  23. # writer of this script, and send me a PM abuot the release of the game/demo. #
  24. # #
  25. #------------------------------------------------------------------------------#
  26. # ** How To Use #
  27. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  28. # #
  29. # *This script is plug and play with some options below. #
  30. # #
  31. #------------------------------------------------------------------------------#
  32. # ** Updates / Version Notes #
  33. #------------------------------------------------------------------------------#
  34. # #
  35. # v0.1 #
  36. # ~=~=~=~ #
  37. # * This script does just like the title says. All of the command texts are #
  38. # indented once they are selected. #
  39. # #
  40. #------------------------------------------------------------------------------#
  41. #==============================================================================#
  42. #==============================================================================
  43. # ** V Menu Indent
  44. #------------------------------------------------------------------------------
  45. # This module manages customizable features and methods.
  46. #==============================================================================
  47. module V_Menu_Indent
  48. module Specs
  49. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  50. # #
  51. # Start Customizable Area. #
  52. # #
  53. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  54. # #
  55. # ONLY EDIT THE DESIGNATED AREAS. #
  56. # #
  57. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  58.  
  59.  
  60.  
  61. #=============================================================================
  62. # * Cursor Options
  63. #=============================================================================
  64.  
  65. X_Cursor_Indent = 5
  66. Y_Cursor_Indent = -3
  67.  
  68.  
  69. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  70. # #
  71. # DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING. #
  72. # #
  73. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95. end
  96. end #<--- End Module===========================================================
  97.  
  98.  
  99. #==============================================================================
  100. # ** Window_MenuCommand
  101. #------------------------------------------------------------------------------
  102. # This command window appears on the menu screen.
  103. #==============================================================================
  104.  
  105. class Window_Command < Window_Selectable
  106.  
  107. #--------------------------------------------------------------------------
  108. # * Include Module
  109. #--------------------------------------------------------------------------
  110. include V_Menu_Indent::Specs
  111.  
  112. #--------------------------------------------------------------------------
  113. # * Open Window
  114. #--------------------------------------------------------------------------
  115. def open
  116. super
  117. refresh
  118. end
  119.  
  120. #--------------------------------------------------------------------------
  121. # * Update Cursor
  122. #--------------------------------------------------------------------------
  123. def update_cursor
  124. super
  125. refresh
  126. end
  127.  
  128. #--------------------------------------------------------------------------
  129. # * Aliasing Method: Get Rectangle for Drawing Item Text
  130. #--------------------------------------------------------------------------
  131. alias :wmcir452452475275 :item_rect_for_text
  132.  
  133. #--------------------------------------------------------------------------
  134. # * Get Rectangle for Drawing Item Text
  135. #--------------------------------------------------------------------------
  136. def item_rect_for_text(index)
  137. if index == @index
  138. rect = item_rect(index)
  139. rect.x += 4 + X_Cursor_Indent
  140. rect.width -= 8 + X_Cursor_Indent
  141. rect
  142. else
  143. wmcir452452475275(index)
  144. end
  145. end
  146.  
  147. end
  148.  
  149.  
  150. #==============================================================================
  151. # ** Window_HorzCommand
  152. #------------------------------------------------------------------------------
  153. # This is a command window for the horizontal selection format.
  154. #==============================================================================
  155.  
  156. class Window_HorzCommand < Window_Command
  157.  
  158. #--------------------------------------------------------------------------
  159. # * Aliasing Method: Get Rectangle for Drawing Item Text
  160. #--------------------------------------------------------------------------
  161. alias :whcirft3543532 :item_rect_for_text
  162.  
  163. #--------------------------------------------------------------------------
  164. # * Get Rectangle for Drawing Item Text
  165. #--------------------------------------------------------------------------
  166. def item_rect_for_text(index)
  167. if index == @index
  168. rect = item_rect(index)
  169. rect.y += Y_Cursor_Indent
  170. rect
  171. else
  172. whcirft3543532(index)
  173. end
  174. end
  175.  
  176. end
Advertisement
Add Comment
Please, Sign In to add comment