#============================================================================== # ■ Numset #------------------------------------------------------------------------------ #  定数全般のモジュールです。 #============================================================================== module Numset # ウィンドウハンドル取得 win = Win32API.new("user32", "FindWindow", %w(p p), "i") WINDOW_HANDLE = win.call("RGSS Player", $game_system.game_title) end #============================================================================== # ■ Kernel #------------------------------------------------------------------------------ #  何か間違えすぎていませんか? #============================================================================== module Kernel #-------------------------------------------------------------------------- # ● メッセージボックス作成 #-------------------------------------------------------------------------- def dialog(code = 0, title = "#{$game_system.game_title}", contents = "") # ハングアップ対策 begin box = mesbox.call(Numset::WINDOW_HANDLE, contents.szis, title.szis, code) return box nil # ハングアップしたら下が実行される rescue Hangup return box end end end #============================================================================== # ■ Game_System #------------------------------------------------------------------------------ #  システム周りのデータを扱うクラスです。BGM などの管理も行います。このクラス # のインスタンスは $game_system で参照されます。 #============================================================================== class Game_System def title # ゲームタイトル取得 win = Win32API.new("kernel32", "GetPrivateProfileString", %w(p p p p i p), "i") title = "\0" * 255 win.call("Game", "Title", "Not title", title, 255, ".\\Game.ini") title.gsub!(/\0/){} return title.utf8 end end