if defined?(Zii) != nil
Move_Icon_Index = 48
Wait_Icon_Index = 117
Status_Icon_Index = 137
class Commands_All < Window_SpinCommand
#-------------------------------------------------------------
# * Object Initialization
#-------------------------------------------------------------
def initialize
s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
s2 = [Vocab::skill, "icon", Zii::SKILL, true]
s3 = [Vocab::guard, "icon", Zii::GUARD, true]
s4 = [Vocab::item, "icon", Zii::ITEM, true]
setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
super(0, 0, [s1,s2,s3,s4],setting)
self.opacity = GTBS::CONTROL_OPACITY
self.index = -1
@actor_display = Window_Actor_Display.new(height)
refresh
self.active = false
set_spin
self.opacity = 0
end
def refresh(actor = nil)
self.index = 0
@actor = actor
item = []
@commands = []
if @actor == nil
s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
s2 = [Vocab::skill, "icon", Zii::SKILL, true]
@commands = [s1,s2]
return
else
self.x, self.y = actor.screen_x - @radius - 28, actor.screen_y - @radius - 28 - 16
create_contents
if GTBS::HIDE_INACTIVE
@commands.push([GTBS::MENU_COMMANDS["Move"], "icon", Move_Icon_Index, true]) if !actor.moved?
if !actor.perfaction?
atk_icon = Zii::ATTACK
if actor.weapons[0] != nil
n = actor.weapons[0].icon_index
atk_icon = n if n > 0
end
@commands.push([GTBS::MENU_COMMANDS["Attack"],"icon", atk_icon,true])
if actor.class.skill_name_valid
@commands.push([actor.class.skill_name, "icon",Zii::SKILL, true])
else
@commands.push([get_class(actor.class_id), "icon",Zii::SKILL, true])
end
@commands.push([GTBS::MENU_COMMANDS["Item"], "icon", Zii::ITEM, true])
if GTBS::AUTO_DEFEND
@commands.push([GTBS::MENU_COMMANDS["Defend"], "icon", Zii::GUARD, true])
else
@commands.push([GTBS::MENU_COMMANDS["Wait"], "icon", Wait_Icon_Index, true])
end
else
@commands.push([GTBS::MENU_COMMANDS["Wait"], "icon", Wait_Icon_Index, true])
end
@commands.push([GTBS::MENU_COMMANDS["Status"], "icon", Status_Icon_Index, true])
else
atk_icon = Zii::ATTACK
if actor.weapons[0] != nil
n = actor.weapons[0].icon_index
atk_icon = n if n > 0
end
s1 = [GTBS::MENU_COMMANDS["Move"], "icon", Move_Icon_Index, true]
s2 = [GTBS::MENU_COMMANDS["Attack"],"icon", atk_icon,true]
s3 = [actor.class.skill_name, "icon",Zii::SKILL, true]
if actor.class.skill_name_valid
s3 = [actor.class.skill_name, "icon",Zii::SKILL, true]
else
s3 = [get_class(actor.class_id), "icon",Zii::SKILL, true]
end
s4 = [GTBS::MENU_COMMANDS["Item"], "icon", Zii::ITEM, true]
if !actor.perfaction? and GTBS::AUTO_DEFEND
s5 = [GTBS::MENU_COMMANDS["Defend"], "icon", Zii::GUARD, true]
else
s5 = [GTBS::MENU_COMMANDS["Wait"], "icon", Wait_Icon_Index, true]
end
s6 = [GTBS::MENU_COMMANDS["Status"], "icon", Status_Icon_Index, true]
@commands = [s1, s2, s3, s4, s5, s6]
end
super()
if !GTBS::HIDE_INACTIVE
disable_item(0) if actor.moved? ##disables move function is already moved
if actor.perfaction?
disable_item(1) ##attack
disable_item(2) ##class skill
disable_item(3) ##item
end
end
@actor_display.refresh(actor)
end
end
def disable_item(index)
@commands[index][3] = false
end
#-------------------------------------------------------------
# Return Command name
#-------------------------------------------------------------
def data(i=-1)
return "" if self.index == -1
return @commands[i][0]
end
def update
if @actor != nil
self.x, self.y = @actor.screen_x - @radius - 28, @actor.screen_y - @radius - 28 - 16
end
super
end
end
end