修改後的版本為
class Window_Data < Window_Base
def initialize
super(0, 0,Graphics.width, Graphics.height)
refresh
end
def refresh
self.contents.clear
end
end
class Scene_Data < Scene_Base
def start
create_menu_background
@Data_window = Window_Data.new
end
def terminate
dispose_menu_background
@Data_window.dispose
end
def update
update_menu_background
@Data_window.update # 更新状态窗口
if Input.trigger?(Input::B) # 判断是否按下B键
Sound.play_cancel # 播放取消音效
$scene = Scene_Map.new # 回到菜单画面
end
end
end