Simple Item Menu

● ARCHIVED · READ-ONLY
Started by Quigon 9 posts View original ↗
  1. Hey all! I took the liberty of making a mockup, complete with width and height values to make it easier for anyone who fancies giving this a shot.

    I'm looking for a new item menu. It should remove the categories, shrink the window, and only show the item description. Here's the mockup I made;

    dIoyUDb.jpg

    I'd be happy with the window only showing two items side by side. The description window is moved to the bottom of the item scene as you can see. As for displaying item quantities, I'd be happy if it was shown to the left of the icon (if that's changeable) - just to avoid too much clutter. The dimensions for the window I'd like are;

    width = 473

    height = 220

    The x & y values of that mockup are 85 and 85, though it'd help if I can alter them easily should I want to change it around.

    Thanks in advance~
  2. If no one helps you beforehand, I'd gladly do this for you once I'm home from work in about 7 hours.
  3. Awesome, thank you!
  4. Herp Derp, I know its lazy, but it gets the job done right?

    Code:
    ## IEK/lib/simple_item_window.rb#   dc 16/11/2013#   dm 16/11/2013#   by IceDragon# As requested by Quigon, a simple Item Menu.# jump to the '### EDITING STARTS HERE' to change the window's position, and# sizeclass Scene_Item < Scene_ItemBase  remove_method :on_category_ok  remove_method :create_category_window  ## ~overwrite  # @return [Void]  def start    super    create_help_window    create_item_window    adjust_windows  end  ## ~overwrite  # @return [Void]  def create_help_window    @help_window = Window_Help.new(1)    @help_window.viewport = @viewport  end  ## ~overwrite  # @return [Void]  def create_item_window    ### EDITING STARTS HERE    ### Rect.new(  x,   y, width, height)    r = Rect.new( 85,  85,   473,    220)    ### EDITING ENDS HERE    @item_window = Window_ItemList.new(r.x, r.y, r.width, r.height)    @item_window.viewport = @viewport    @item_window.help_window = @help_window    @item_window.set_handler(:ok,     method(:on_item_ok))    @item_window.set_handler(:cancel, method(:on_item_cancel))  end  ## ~new-item  # @return [Void]  def adjust_windows    ### item_window    ### inline-defintions, please don't try this at home...    def @item_window.include?(item)      $game_party.usable?(item)    end    ## uncomment this, to hide item quantities    #def @item_window.draw_item(index)    #  item = @data[index]    #  if item    #    rect = item_rect(index)    #    rect.width -= 4    #    draw_item_name(item, rect.x, rect.y, enable?(item))    #  end    #end    ###    @item_window.refresh    @item_window.activate.select_last    ### help_window    @help_window.width = @item_window.width    @help_window.x = @item_window.x    @help_window.y = @item_window.y + @item_window.height    @help_window.create_contents # re-create the Help_Window contents    @help_window.refresh  end  ## ~overwrite  # @return [Void]  def on_item_cancel    return_scene  endend
  5. Thanks! Though whenever I exit out of the item menu, the window isn't disposed and the game freezes.

    I'm using a script to change the look of the main menu as well as YAN's menu options to add in some commands to it, if those would be problems.
  6. I was just looking over the code myself, I made a small mistake on the #on_item_cancel


    :) I've fixed it now.
  7. That works! Though the item quantities aren't displaying.
  8. yeah, I kinda removed that to match the screenshot you provided, sowwy?


    I've commented out the code, try it now.
  9. My bad, that works perfectly now. Thanks a bunch!