@炫宇我理解的是这样的,不过脚本有 点乱
修改Window_TitleCommand的def make_command_list为
#-------------------------------------------------------------------------- # ● 生成指令列表 #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::new_game, :new_game) add_command(Vocab::continue, :continue, continue_enabled) add_command("操作帮助", :Help_Title) add_command("脚本来源", :Web_Title) add_command(Vocab::shutdown, :shutdown) end
#--------------------------------------------------------------------------
# ● 生成指令列表
#--------------------------------------------------------------------------
def make_command_list
add_command(Vocab::new_game, :new_game)
add_command(Vocab::continue, :continue, continue_enabled)
add_command("操作帮助", :Help_Title)
add_command("脚本来源", :Web_Title)
add_command(Vocab::shutdown, :shutdown)
end
修改Scene_Title的def create_command_window为
#-------------------------------------------------------------------------- # ● 生成指令窗口 #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler(:Help_Title, method(:command_Help_Title)) @command_window.set_handler(:Web_Title, method(:command_Web_Title)) @command_window.set_handler(:new_game, method(:command_new_game)) @command_window.set_handler(:continue, method(:command_continue)) @command_window.set_handler(:shutdown, method(:command_shutdown)) @command_Help = Window_Help_Title.new @command_Help.set_handler(:cancel, method(:on_Help_cancel)) @command_Help.hide end
#--------------------------------------------------------------------------
# ● 生成指令窗口
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_TitleCommand.new
@command_window.set_handler(:Help_Title, method(:command_Help_Title))
@command_window.set_handler(:Web_Title, method(:command_Web_Title))
@command_window.set_handler(:new_game, method(:command_new_game))
@command_window.set_handler(:continue, method(:command_continue))
@command_window.set_handler(:shutdown, method(:command_shutdown))
@command_Help = Window_Help_Title.new
@command_Help.set_handler(:cancel, method(:on_Help_cancel))
@command_Help.hide
end
修改Scene_Title的添加
def command_Web_Title @jump = Win32API.new('shell32.dll','ShellExecuteA',%w(p p p p p i),'i')# @jump.call(0, 'open','http://rpg.blue',0, 0, 1) # 修改网址 @command_window.activate end def command_Help_Title @command_Help.show @command_Help.activate @command_window.hide end def on_Help_cancel @command_Help.hide @command_window.show @command_window.activate end
def command_Web_Title
@jump = Win32API.new('shell32.dll','ShellExecuteA',%w(p p p p p i),'i')#
@jump.call(0, 'open','http://rpg.blue',0, 0, 1) # 修改网址
@command_window.activate
end
def command_Help_Title
@command_Help.show
@command_Help.activate
@command_window.hide
end
def on_Help_cancel
@command_Help.hide
@command_window.show
@command_window.activate
end
新建一个Window_Help_Title
#encoding:utf-8 #============================================================================== # ■ Window_Help_Title #------------------------------------------------------------------------------ # 标题帮助页面 #============================================================================== class Window_Help_Title <Window_Selectable #Window_Base #-------------------------------------------------------------------------- # ● 初始化对象 #-------------------------------------------------------------------------- def initialize super(0, 0, Graphics.width,Graphics.height) refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh bitmap = Cache.load_bitmap("Graphics/Titles1/","Fountain")#图片可以修改 rect = Rect.new(0, 0, 544,416) contents.blt(0,0, bitmap, rect, 255) bitmap.dispose draw_text_ex(4, 0, "按ESC返回Scene_Title")#文字可以添加 draw_text_ex(4, 24, "按ESC返回Scene_Title") end end
#encoding:utf-8
#==============================================================================
# ■ Window_Help_Title
#------------------------------------------------------------------------------
# 标题帮助页面
#==============================================================================
class Window_Help_Title <Window_Selectable #Window_Base
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
super(0, 0, Graphics.width,Graphics.height)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
bitmap = Cache.load_bitmap("Graphics/Titles1/","Fountain")#图片可以修改
rect = Rect.new(0, 0, 544,416)
contents.blt(0,0, bitmap, rect, 255)
bitmap.dispose
draw_text_ex(4, 0, "按ESC返回Scene_Title")#文字可以添加
draw_text_ex(4, 24, "按ESC返回Scene_Title")
end
end
效果图如下
|