Item Menu Header Button

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
Try this
Spoiler: item menu exit
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
Try this
Spoiler: item menu exit
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.
If it didn't work for you, you must have a conflicting script. This is pretty basic.
exit.PNG
If it didn't work for you, you must have a conflicting script. This is pretty basic.
View attachment 77449
Can you show me a screenshot showing the button in your item menu header?

Edit: nvm, got it
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/item-menu-header-button.88012/