class Window_ItemCategory < Window_Command
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
if $game_temp.in_battle
cols = KGC::CategorizeItem::CATEGORY_WINDOW_COLUMNS_BATTLE
width = KGC::CategorizeItem::CATEGORY_WINDOW_COL_WIDTH_BATTLE
space = KGC::CategorizeItem::CATEGORY_WINDOW_COL_SPACE_BATTLE
commands = KGC::CategorizeItem::CATEGORY_NAME_BATTLE
position = KGC::CategorizeItem::CATEGORY_WINDOW_POSITION_BATTLE
else
cols = KGC::CategorizeItem::CATEGORY_WINDOW_COLUMNS
width = KGC::CategorizeItem::CATEGORY_WINDOW_COL_WIDTH
space = KGC::CategorizeItem::CATEGORY_WINDOW_COL_SPACE
commands = KGC::CategorizeItem::CATEGORY_NAME
position = KGC::CategorizeItem::CATEGORY_WINDOW_POSITION
end
width = width * cols + 32
width += (cols - 1) * space
super(width, commands, cols, 0, space)
self.x = position[0]
self.y = position[1]
self.z = 1000
self.index = 0
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
if $game_temp.in_battle
text = KGC::CategorizeItem::CATEGORY_DESCRIPTION_BATTLE[self.index]
else
text = KGC::CategorizeItem::CATEGORY_DESCRIPTION[self.index]
end
@help_window.set_text(text)
@help_window.opacity = 255
@help_window.x = 0
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★