Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 8192 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - Icons In Menu

The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: Rune on May 26, 2007, 07:16:55 PM

Title: Icons In Menu
Post by: Rune on May 26, 2007, 07:16:55 PM
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)
Title: Re: Icons In Menu
Post by: gameo on May 26, 2007, 09:09:26 PM
Neat. Think i'll use this.

Should i credit you, or as long as i don't say i maked it.....?
Title: Re: Icons In Menu
Post by: Rune on May 26, 2007, 09:32:45 PM
Up to you... just don't say it was by you... :D
Title: Re: Icons In Menu
Post by: subzero on February 23, 2008, 07:33:27 PM
Any screenshots?
Title: Re: Icons In Menu
Post by: Rune on March 04, 2008, 09:45:08 PM
This was some time ago :D I'll see if I can whip one up ;)