Project1
标题:
一个菜单的加选项修改
[打印本页]
作者:
负零
时间:
2010-7-8 07:28
标题:
一个菜单的加选项修改
本帖最后由 负零 于 2010-7-8 08:06 编辑
搜索无果...特来发问。
我按照提示
如果是修改 Scene_Menu 增加選項的話,请使用
$scene = Scene_Task.new(任务在菜单的index)
例如:$scene = Scene_Task.new(7)
复制代码
添加了
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
s7 = $scene = Scene_Task.new(7)
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.openness = 0
@command_window.open
@command_window.opacity = 0
@command_window.contents_opacity = 0
复制代码
为什么一进菜单就会直接执行 $scene = Scene_Task.new(7) 我什么都没有按 冤啊...
另外,我想呼出【パーティ編成】这一菜单 应该怎样填 s8 = ???
when 10 # パーティ編成
next unless $imported["LargeParty"]
index_list[:partyform] = commands.size
@__command_partyform_index = commands.size
commands << Vocab.partyform
复制代码
这是较完整的一段
#--------------------------------------------------------------------------
# ○ コマンド一覧の作成
# コマンド名の一覧を返す。
#--------------------------------------------------------------------------
def create_command_list
commands = []
index_list = {}
@exmenu_command_scene = {}
@disabled_command_index = []
KGC::CustomMenuCommand::MENU_COMMANDS.each_with_index { |c, i|
case c
when 0 # アイテム
index_list[:item] = commands.size
commands << Vocab.item
when 1 # スキル
index_list[:skill] = commands.size
commands << Vocab.skill
when 2 # 装備
index_list[:equip] = commands.size
commands << Vocab.equip
when 3 # ステータス
index_list[:status] = commands.size
commands << Vocab.status
when 4 # セーブ
index_list[:save] = commands.size
commands << Vocab.save
when 5 # ゲーム終了
index_list[:game_end] = commands.size
commands << Vocab.game_end
when 10 # パーティ編成
next unless $imported["LargeParty"]
index_list[:partyform] = commands.size
@__command_partyform_index = commands.size
commands << Vocab.partyform
when 11 # AP ビューア
next unless $imported["EquipLearnSkill"]
index_list[:ap_viewer] = commands.size
@__command_ap_viewer_index = commands.size
commands << Vocab.ap_viewer
when 12 # スキル設定
next unless $imported["SkillCPSystem"]
index_list[:set_battle_skill] = commands.size
@__command_set_battle_skill_index = commands.size
commands << Vocab.set_battle_skill
when 13 # 戦闘難易度
next unless $imported["BattleDifficulty"]
index_list[:set_difficulty] = commands.size
@__command_set_difficulty_index = commands.size
commands << KGC::BattleDifficulty.get[:name]
when 14 # パラメータ振り分け
next unless $imported["DistributeParameter"]
index_list[:distribute_parameter] = commands.size
@__command_distribute_parameter_index = commands.size
commands << Vocab.distribute_parameter
when 15 # モンスター図鑑
next unless $imported["EnemyGuide"]
index_list[:enemy_guide] = commands.size
@__command_enemy_guide_index = commands.size
commands << Vocab.enemy_guide
when 100..199 # ExMenu_CustomCommand
next unless KGC::CustomMenuCommand::EXMNU_CTCMD_OK # 使用不可なら次へ
excommand = EXMNU_CTCMD_COMMANDS[c - 100] # コマンドindex取得
unless command_visible?(excommand) || command_inputable?(excommand)
next # 不可視なら次へ
end
index_list[excommand[2]] = commands.size
commands << excommand[2]
@exmenu_command_scene[excommand[2]] = excommand[3]
end
}
$game_temp.menu_command_index = index_list
return commands
end
复制代码
我想加分放这里 怎么加...??
作者:
负零
时间:
2010-7-8 08:06
已经自己解决 谢谢...
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1