This repository has been archived on 2026-05-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rpgskeleton/Scripts/RPG/Window_ItemCategory.rb

56 lines
2.2 KiB
Ruby
Raw Normal View History

2014-04-23 21:59:50 -07:00
# -*- coding: utf-8 -*-
#==============================================================================
# ** Window_ItemCategory
#------------------------------------------------------------------------------
# This window is for selecting a category of normal items and equipment
# on the item screen or shop screen.
#==============================================================================
class Window_ItemCategory < Window_HorzCommand
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :item_window
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Graphics.width
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def col_max
return 4
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
@item_window.category = current_symbol if @item_window
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(Vocab::item, :item)
add_command(Vocab::weapon, :weapon)
add_command(Vocab::armor, :armor)
add_command(Vocab::key_item, :key_item)
end
#--------------------------------------------------------------------------
# * Set Item Window
#--------------------------------------------------------------------------
def item_window=(item_window)
@item_window = item_window
update
end
end