Redd's Icons

What this basically do is make the Title Screen, Menu, and End Game screen have icons next to their options. You can customize the icons, by the way. And yes, I know, there are TONS of scripts like this, but it is the first script I ever made.

Put all of these above main and below any other scripts you might have

Hope you like them. YOU MUST GIVE ME CREDIT AT SOME POINT IN YOUR GAME!

Here's the script! Make sure to read the instructions at the top of every single one, okay? There are 3 scripts put together in one here, so make sure to read ALL of their instructions!
  1. #==============================================================================
  2. # ** Redd's TitleIcons
  3. #==============================================================================
  4. #  Gives the title screen the ability to have icons in the choices
  5. #==============================================================================
  6. #  Instructions
  7. #
  8. #  After configuring what you want your icons to be, go into Scene_Title, look
  9. #  for line 40, and change
  10. #  @command_window = Window_Command.new(192, [s1, s2, s3])
  11. #  to...
  12. #  @command_window = Window_TitleIcons.new(192, [s1, s2, s3])
  13. #
  14. #  And there you have it. If you need any support just email [email hidden]
  15. #==============================================================================
  16.  
  17. class Window_TitleIcons < Window_Command
  18.   #--------------------------------------------------------------------------
  19.   # * Refresh
  20.   #--------------------------------------------------------------------------
  21.   def refresh
  22. self.contents.clear
  23. for i in 0...@item_max
  24.   draw_item(i, normal_color)
  25.   # Draw the icon associated with the index.
  26.   draw_icon(i)
  27. end
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # * Draw Item
  31.   #--------------------------------------------------------------------------
  32.   def draw_item(index, color)
  33. self.contents.font.color = color
  34. # rect = Rect.new(x, y, width, height) Note the x is 32, not the default 4.
  35. rect = Rect.new(32, 32 * index, self.contents.width - 8, 32)
  36. self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  37. self.contents.draw_text(rect, @commands[index])
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # * Draw Icon
  41.   #--------------------------------------------------------------------------
  42.   def draw_icon(index)
  43. # Case index
  44. case index
  45. # Conditional branch ^_^
  46. when 0
  47.   # Sets the icon name (Case Sensitive)
  48.   icon = '001-Weapon01'
  49. when 1
  50.   icon = '035-Item04'
  51. when 2
  52.   icon = '046-Skill03'
  53. # If there are more than 3 commands:
  54. else
  55.   # Don't draw anything.
  56.   icon = ''
  57. end
  58. # Create the bitmap image for the icon
  59. bitmap = RPG::Cache.icon(icon)
  60. # Make the rectangle for the image to be in
  61. src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  62. # Draw the bitmap inside the rectangle, at 4 pixels across,
  63. # and down according to the index
  64. self.contents.blt(4, 32*index+5, bitmap, src_rect)
  65.   end
  66. end
  67. #==============================================================================
  68. # ** Redd's MenuIcons
  69. #==============================================================================
  70. #  Gives the menu the ability to have icons in the choices
  71. #==============================================================================
  72. #  Instructions
  73. #
  74. #  After configuring what you want your icons to be, go into Scene_Title, look
  75. #  for line 26, and change
  76. #  @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  77. #  to...
  78. #  @command_window = Window_MenuIcons.new(160, [s1, s2, s3, s4, s5, s6])
  79. #
  80. #  And there you have it. If you need any support just email [email hidden]
  81. #==============================================================================
  82.  
  83. class Window_MenuIcons < Window_Command
  84.   #--------------------------------------------------------------------------
  85.   # * Refresh
  86.   #--------------------------------------------------------------------------
  87.   def refresh
  88. self.contents.clear
  89. for i in 0...@item_max
  90.   draw_item(i, normal_color)
  91.   # Draw the icon associated with the index.
  92.   draw_icon(i)
  93. end
  94.   end
  95.   #--------------------------------------------------------------------------
  96.   # * Draw Item
  97.   #--------------------------------------------------------------------------
  98.   def draw_item(index, color)
  99. self.contents.font.color = color
  100. # rect = Rect.new(x, y, width, height) Note the x is 32, not the default 4.
  101. rect = Rect.new(32, 32 * index, self.contents.width - 8, 32)
  102. self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  103. self.contents.draw_text(rect, @commands[index])
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # * Draw Icon
  107.   #--------------------------------------------------------------------------
  108.   def draw_icon(index)
  109. # Case index
  110. case index
  111. # Conditional branch ^_^
  112. when 0
  113.   # Sets the icon name (Case Sensitive)
  114.   icon = '032-Item01'
  115. when 1
  116.   icon = '050-Skill07'
  117. when 2
  118.   icon = '013-Body01'
  119. when 3
  120.   icon = '040-Item09'
  121. when 4
  122.   icon = '035-Item04'
  123. when 5
  124.   icon = '046-Skill03'
  125. # If there are more than 6 commands:
  126. else
  127.   # Don't draw anything.
  128.   icon = ''
  129. end
  130. # Create the bitmap image for the icon
  131. bitmap = RPG::Cache.icon(icon)
  132. # Make the rectangle for the image to be in
  133. src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  134. # Draw the bitmap inside the rectangle, at 4 pixels across,
  135. # and down according to the index
  136. self.contents.blt(4, 32*index+5, bitmap, src_rect)
  137.   end
  138. end
  139. #==============================================================================
  140. # ** Redd's EndIcons
  141. #==============================================================================
  142. #  Gives the ending screen the ability to have icons in the choices
  143. #==============================================================================
  144. #  Instructions
  145. #
  146. #  After configuring what you want your icons to be, go into Scene_End, look
  147. #  for line 16, and change
  148. #  @command_window = Window_Command.new(192, [s1, s2, s3])
  149. #  to...
  150. #  @command_window = Window_EndIcons.new(192, [s1, s2, s3])
  151. #
  152. #  And there you have it. If you need any support just email [email hidden]
  153. #==============================================================================
  154.  
  155. class Window_EndIcons < Window_Command
  156.   #--------------------------------------------------------------------------
  157.   # * Refresh
  158.   #--------------------------------------------------------------------------
  159.   def refresh
  160. self.contents.clear
  161. for i in 0...@item_max
  162.   draw_item(i, normal_color)
  163.   # Draw the icon associated with the index.
  164.   draw_icon(i)
  165. end
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # * Draw Item
  169.   #--------------------------------------------------------------------------
  170.   def draw_item(index, color)
  171. self.contents.font.color = color
  172. # rect = Rect.new(x, y, width, height) Note the x is 32, not the default 4.
  173. rect = Rect.new(32, 32 * index, self.contents.width - 8, 32)
  174. self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  175. self.contents.draw_text(rect, @commands[index])
  176.   end
  177.   #--------------------------------------------------------------------------
  178.   # * Draw Icon
  179.   #--------------------------------------------------------------------------
  180.   def draw_icon(index)
  181. # Case index
  182. case index
  183. # Conditional branch ^_^
  184. when 0
  185.   # Sets the icon name (Case Sensitive)
  186.   icon = '048-Skill05'
  187. when 1
  188.   icon = '046-Skill03'
  189. when 2
  190.   icon = '036-Item05'
  191. # If there are more than 3 commands:
  192. else
  193.   # Don't draw anything.
  194.   icon = ''
  195. end
  196. # Create the bitmap image for the icon
  197. bitmap = RPG::Cache.icon(icon)
  198. # Make the rectangle for the image to be in
  199. src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  200. # Draw the bitmap inside the rectangle, at 4 pixels across,
  201. # and down according to the index
  202. self.contents.blt(4, 32*index+5, bitmap, src_rect)
  203.   end
  204. end
Expand to see the code.
Sounds useful Red, thanks for posting. :)
One thing I will say is using screenshots makes the difference. Might want to get a screenie up to show people what it can do.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=75205