class Scene_Font
def main
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@help = Window_Help.new
@help.set_text("选择你需要的字体",1)
@s1 = "黑体"
@s2 = "新细明体"
@s3 = "宋体"
@s4 = "標楷體"
@s5 = "Arial"
@s6 = "悩殘軆"
@command_window = Window_Command.new(192, [@s1, @s2, @s3, @s4, @s5, @s6])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
@help.dispose
end
def update
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
Font.default_name = ([@s1])
when 1
Font.default_name = ([@s2])
when 2
Font.default_name = ([@s3])
when 3
Font.default_name = ([@s4])
when 4
Font.default_name = ([@s5])
when 5
Font.default_name = ([@s6])
end
end
end
end
#==============================================================================
# ■ Main
#------------------------------------------------------------------------------
# 各定义结束后、从这里开始实际处理。
#==============================================================================
begin
# 准备过渡
# 设置系统默认字体
Font.default_name = ([黑体])
Graphics.freeze
# 生成场景对像 (标题画面)
$scene = Scene_Font.new
# $scene 为有效的情况下调用 main 过程
while $scene != nil
$scene.main
end
# 淡入淡出
Graphics.transition(20)
rescue Errno::ENOENT
# 补充 Errno::ENOENT 以外错误
# 无法打开文件的情况下、显示信息后结束
filename = $!.message.sub("No such file or directory - ", "")
print("找不到文件 #{filename}。 ")
end