Item Menu Header Button

Status
Not open for further replies.

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
331
Reaction score
90
First Language
English
Primarily Uses
N/A
I'm not sure which forum this goes in, so hopefully I got it right. I want an exit button in the middle of the item menu's header. The button will close the item menu. Thank you for any and all help given!

ex.PNG
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,675
Reaction score
566
First Language
English
Primarily Uses
RMVXA
Try this
Code:
#==============================================================================
# ** Window_ItemCategory
#------------------------------------------------------------------------------
#  This window is for selecting a category of normal items and equipment
# on the item screen or shop screen.
#==============================================================================
module Vocab
  def self.leave;  "Exit";    end   # Cancel
end
 
class Window_ItemCategory < Window_HorzCommand
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :item_window
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 5
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command(Vocab::item,     :item)
    add_command(Vocab::weapon,   :weapon)
    add_command(Vocab::leave,    :cancel)
    add_command(Vocab::armor,    :armor)
    add_command(Vocab::key_item, :key_item)
  end
end
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
331
Reaction score
90
First Language
English
Primarily Uses
N/A
Try this
Code:
#==============================================================================
# ** Window_ItemCategory
#------------------------------------------------------------------------------
#  This window is for selecting a category of normal items and equipment
# on the item screen or shop screen.
#==============================================================================
module Vocab
  def self.leave;  "Exit";    end   # Cancel
end
 
class Window_ItemCategory < Window_HorzCommand
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :item_window
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 5
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command(Vocab::item,     :item)
    add_command(Vocab::weapon,   :weapon)
    add_command(Vocab::leave,    :cancel)
    add_command(Vocab::armor,    :armor)
    add_command(Vocab::key_item, :key_item)
  end
end
Thank you! I added an "end" to the end because it was missing. But the button doesn't show up in the header. In any case, I found a workaround by turning an item into a "button;" when you pick it, the item menu closes.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,675
Reaction score
566
First Language
English
Primarily Uses
RMVXA
If it didn't work for you, you must have a conflicting script. This is pretty basic.
exit.PNG
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top