Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #==============================================================================
  2. # ** Window_ItemCategory
  3. #------------------------------------------------------------------------------
  4. # This window is for selecting a category of normal items and equipment
  5. # on the item screen or shop screen.
  6. #==============================================================================
  7.  
  8. class Window_ItemCategory < Window_HorzCommand
  9. #--------------------------------------------------------------------------
  10. # * Public Instance Variables
  11. #--------------------------------------------------------------------------
  12. attr_reader :item_window
  13. #--------------------------------------------------------------------------
  14. # * Object Initialization
  15. #--------------------------------------------------------------------------
  16. def initialize
  17. super(0, 0)
  18. end
  19. #--------------------------------------------------------------------------
  20. # * Get Window Width
  21. #--------------------------------------------------------------------------
  22. def window_width
  23. Graphics.width
  24. end
  25. #--------------------------------------------------------------------------
  26. # * Get Digit Count
  27. #--------------------------------------------------------------------------
  28. def col_max
  29. return 4
  30. end
  31. #--------------------------------------------------------------------------
  32. # * Frame Update
  33. #--------------------------------------------------------------------------
  34. def update
  35. super
  36. @item_window.category = current_symbol if @item_window
  37. end
  38. #--------------------------------------------------------------------------
  39. # * Create Command List
  40. #--------------------------------------------------------------------------
  41. def make_command_list
  42. # add_command(Vocab::item, :item)
  43. # add_command(Vocab::weapon, :weapon)
  44. # add_command(Vocab::armor, :armor)
  45. add_command(Vocab::key_item, :Items)
  46. end
  47. #--------------------------------------------------------------------------
  48. # * Set Item Window
  49. #--------------------------------------------------------------------------
  50. def item_window=(item_window)
  51. @item_window = item_window
  52. update
  53. end
  54. end