| 赞 | 1 |
| VIP | |
| 好人卡 | |
| 积分 | 14 |
| 经验 | |
| 最后登录 | 2021-9-28 |
| 在线时间 | 343 小时 |
- 梦石
- 0
- 星屑
- 1388
- 在线时间
- 343 小时
- 注册时间
- 2016-7-17
- 回帖
- 82
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 b200077 于 2017-3-28 20:14 编辑
Vocab模塊重定義module Vocab
def self.ADV_commond(com)
case com
when "AUTO"
return "自動"
when "SKIP"
return "略過"
when "LOG"
return "回顧"
when "SAVE"
return "保存"
when "LOAD"
return "讀取"
when "CONFING"
return "設定"
when "TITLE"
return "標題"
end
end
end
對話框中顯示指令的視窗#==============================================================================
# ■ Window_MessageCommand
#------------------------------------------------------------------------------
# 對話框中顯示指令的視窗
#==============================================================================
class Window_MessageCommand < Window_HorzCommand
#--------------------------------------------------------------------------
# ● 初始化物件
#--------------------------------------------------------------------------
def initialize
super(240, 240)
end
#--------------------------------------------------------------------------
# ● 取得視窗的寬度
#--------------------------------------------------------------------------
def window_width
return 300
end
#--------------------------------------------------------------------------
# ● 取得顯示行數
#--------------------------------------------------------------------------
def visible_line_number
item_max
end
#--------------------------------------------------------------------------
# ● 生成指令清單
#--------------------------------------------------------------------------
def make_command_list
add_main_commands
add_original_commands
end
#--------------------------------------------------------------------------
# ● 向指令清單加入主要的指令
#--------------------------------------------------------------------------
def add_main_commands
add_command(Vocab.ADV_commond("AUTO") , :auto, main_commands_enabled)
add_command(Vocab.ADV_commond("SKIP") , :skip, main_commands_enabled)
add_command(Vocab.ADV_commond("LOG") , :log, main_commands_enabled)
add_command(Vocab.ADV_commond("SAVE") , :save, main_commands_enabled)
add_command(Vocab.ADV_commond("LOAD") , :load, main_commands_enabled)
add_command(Vocab.ADV_commond("CONFING") , :confing, main_commands_enabled)
add_command(Vocab.ADV_commond("TITLE") , :title, main_commands_enabled)
end
#--------------------------------------------------------------------------
# ● 獨自加入指令用
#--------------------------------------------------------------------------
def add_original_commands
end
#--------------------------------------------------------------------------
# ● 取得主要指令的有效狀態
#--------------------------------------------------------------------------
def main_commands_enabled
$game_party.exists
end
#--------------------------------------------------------------------------
# ● 取得存檔的有效狀態
#--------------------------------------------------------------------------
def save_enabled
!$game_system.save_disabled
end
#--------------------------------------------------------------------------
# ● 按下確定鍵時的處理
#--------------------------------------------------------------------------
def process_ok
@@last_command_symbol = current_symbol
super
end
end
信息欄擴充#ADV用呼叫選單
#==============================================================================
# ■ Window_Message
#------------------------------------------------------------------------------
# 顯示文字訊息的視窗。
#==============================================================================
class Window_Message < Window_Base
#--------------------------------------------------------------------------
# ● 處理輸入等待
#--------------------------------------------------------------------------
def input_pause
self.pause = true
create_ADV_windows
wait(10)
Fiber.yield until Input.trigger?(:C)
Input.update
self.pause = false
end
#--------------------------------------------------------------------------
# ● 生成所有視窗
#--------------------------------------------------------------------------
def create_ADV_windows
@command_window = Window_MessageCommand.new
@command_window.set_handler(:auto, method(:command_auto))
@command_window.set_handler(:skip, method(:command_skip))
@command_window.set_handler(:log, method(:command_log))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:confing, method(:command_confing))
@command_window.set_handler(:title, method(:command_title))
end
#--------------------------------------------------------------------------
# ● 更新ADV視窗
#--------------------------------------------------------------------------
alias update_ADV_windows update_all_windows
def update_ADV_windows
update_all_windows
@command_window.update
end
#--------------------------------------------------------------------------
# ● 指令“自動”
#--------------------------------------------------------------------------
def command_auto
end
#--------------------------------------------------------------------------
# ● 指令“略過”
#--------------------------------------------------------------------------
def command_skip
end
#--------------------------------------------------------------------------
# ● 指令“回顧”
#--------------------------------------------------------------------------
def command_log
end
#--------------------------------------------------------------------------
# ● 指令“保存”
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
#--------------------------------------------------------------------------
# ● 指令“讀取”
#--------------------------------------------------------------------------
def command_load
SceneManager.call(Scene_Load)
end
#--------------------------------------------------------------------------
# ● 指令“菜單”
#--------------------------------------------------------------------------
def command_confing
SceneManager.call(Scene_Menu)
end
#--------------------------------------------------------------------------
# ● 指令“標題”
#--------------------------------------------------------------------------
def command_title
SceneManager.call(Scene_Title)
end
end
有出現視窗,但無法選擇,而且會一直疊加,還是可以不用寫在Window_Message裡面
|
|