src/Windows/Window_ActorCommand.rb
#--------------------------------------------------------------------------
# * Create an item for CommandsList
#     index : item index
#--------------------------------------------------------------------------
Create an item for CommandsList
index : item index
Create an item for CommandsList index : item index
def create_item(index)
    command = @commands[index]
    rect = item_rect(index, true)
    if command.is_a?(Item_Command)
      control = UCItem.new(self, command.item, rect)
      control.active = $game_party.item_can_use?(command.item)
    elsif command.is_a?(Skill_Command) && !command.is_custom
      control = UCSkill.new(self, command.skill, rect, @actor.calc_mp_cost(command.skill))
      control.active = @actor.skill_can_use?(command.skill)
    else
      control = CLabel.new(self, rect, command == nil ? "" : command.name)
      control.cut_overflow = true
    end
    return control
  end
def create_item ( index ) command = @commands [ index ] rect = item_rect ( index , true ) if command . is_a? ( Item_Command ) control = UCItem . new ( self , command . item , rect ) control . active = $game_party . item_can_use? ( command . item ) elsif command . is_a? ( Skill_Command ) && ! command . is_custom control = UCSkill . new ( self , command . skill , rect , @actor . calc_mp_cost ( command . skill ) ) control . active = @actor . skill_can_use? ( command . skill ) else control = CLabel . new ( self , rect , command == nil ? "" : command . name ) control . cut_overflow = true end return control end
Create an item for CommandsList
index : item index
Create an item for CommandsList index : item index
index
<not_specific>