Jump to content
Sign in to follow this  
SpuddyGoggles

Removing Item Category List

Recommended Posts

Once again I call upon the RPGMakerCentral forums for assistance in my (likely fruitless) endeavor to create a somewhat passable project.

This time it concerns an aspect of the Item menu.

I've already changed a few things to my liking, though now I still have the issue of the pesky category window which forces the user to redundantly press the action button twice.

For clarity, I basically only have one item category with includes all item types (key items, weapons, armors, etc.) but it seems that the item list window and item scene are somewhat dependent on the category window's colon yellowtext variables (I have no clue what they're called) and I can't figure out how to tie the categories I already have to just the item list without the need of the category window output.

(For context, this is what I put into Window_ItemList in case that is any help.)

def include?(item)
  case @category
  when :item
    item.is_a?(RPG::Item) || item.is_a?(RPG::Armor) || item.is_a?(RPG::Weapon)
  else
    false
  end
end

 

Capture4.PNG

Share this post


Link to post
Share on other sites

Use this

class Scene_Item < Scene_ItemBase
  def start
    super
    create_help_window
    create_item_window
  end
  def create_item_window
    wy = @help_window.y + @help_window.height
    wh = Graphics.height - wy
    @item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
    @item_window.viewport = @viewport
    @item_window.category = :item
    @item_window.help_window = @help_window
    @item_window.set_handler(:ok,     method(:on_item_ok))
    @item_window.set_handler(:cancel, method(:return_scene))
    @item_window.activate
    @item_window.select_last
  end
end
class Window_ItemList < Window_Selectable
  def include?(item)
    return true
  end
end

and legue is spelled league.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted