RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Icons In Menu

Started by Rune, May 26, 2007, 07:16:55 PM

0 Members and 1 Guest are viewing this topic.

Rune

Ever wanted icons in your menu?
Just either:
1) Make a new script, call it Window_Icons and paste this code into it
Or
2) Paste this code at the top of your menu script

class Window_Icons < Window_Base
  def initialize
    super(0, 0, 160, 196)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    bitmap = RPG::Cache.icon("034-Item03")
    self.contents.blt(100, 4, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("044-Skill01")
    self.contents.blt(100, 36, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("013-Body01")
    self.contents.blt(100, 68, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("Status")
    self.contents.blt(100, 100, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("037-Item06")
    self.contents.blt(100, 132, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("039-Item08")
    self.contents.blt(100, 164, bitmap, Rect.new(0, 0, 24, 24), 160)
  end
end


Before the line that says
@command_window = Window_Command.new
Paste this:
@icon_window = Window_Icons.new
@icon_window.x = !!!
@icon_window.y = !!!!

Change the !!! to the x co-ordinates of your command windowand change !!!! to the y co-ordinates of it

Then where it says all the crap like:
@command_window.dispose
Insert:
@icon_window.dispose
Then find:
@command_window.update
And add:
@icon_window.update

If you need any help on re-arranging the icons just ask me ;)

Status Icon is attatched to this post if anyone needs it...
(Quick paint job, I apologise for the quality)
Sincerely,
Your conscience.

gameo

Neat. Think i'll use this.

Should i credit you, or as long as i don't say i maked it.....?
Does 2+2 equal a peanut?

Rune

Up to you... just don't say it was by you... :D
Sincerely,
Your conscience.

subzero




Rune

This was some time ago :D I'll see if I can whip one up ;)
Sincerely,
Your conscience.