| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2013-9-17 |
| 在线时间 | 57 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 57 小时
- 注册时间
- 2012-9-1
- 回帖
- 24
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 huhumaru 于 2013-4-3 15:44 编辑
我用的日站A1上面的脚本。ht(防和谐)tp://a1tktk.web.fc2.com/scripts_page/name_window.html
之前下的V1.00的版本可以正常显示,下了V2.40版本后,显示人名的窗口就看不到边框和背景了。我找了许久原因还是没找到。
求高人帮忙看一下啊~~代码和画面都放下面了
这个是问题画面
这个是老版本的代码
- #===========================================================================
- # ◆ A1 Scripts ◆
- # ネームウィンドウ(RGSS3)
- #
- # バージョン : 1.00 (2011/12/15)
- # 作者 : A1
- # URL : ht(防和谐)tp://a1tktk.web.fc2.com/
- #---------------------------------------------------------------------------
- # 機能:
- # ・ネームウィンドウを表示します
- #---------------------------------------------------------------------------
- # 更新履歴 :2011/12/15 Ver1.00 リリース
- #---------------------------------------------------------------------------
- # 設置場所
- # RGSS3用A1共通スクリプトより下
- #
- # 必要スクリプト
- # RGSS3用A1共通処理
- #---------------------------------------------------------------------------
- # 使い方
- # 設定項目を設定します
- # イベントコマンド「注釈」で表示の on/off を切り替えます
- #
- # ネームウィンドウ on|off
- #==============================================================================
- $imported ||= {}
- $imported["A1_Name_Window"] = true
- if $imported["A1_Common_Script"]
- #==============================================================================
- # ■ 設定項目
- #==============================================================================
- module A1_System::NameWindow
- #--------------------------------------------------------------------------
- # ネームウィンドウを使用するクラス
- #--------------------------------------------------------------------------
- USE_NAME_WINDOW_CLASS = [Window_Message]
-
- #--------------------------------------------------------------------------
- # ネームウィンドウのフォント
- #--------------------------------------------------------------------------
- NAME_FONT = "UmePlus Gothic"
-
- #--------------------------------------------------------------------------
- # 顔グラフィックと名前の対応
- #
- # "[ファイル名]_[Index]" => "表示する名前" ※Index毎に設定
- # "[ファイル名]" => "表示する名前" ※該当ファイル全てに適用
- #--------------------------------------------------------------------------
- NAME_LIST = {
-
- "美鶴" => "黒姫美鶴",
- "理香" => "菅平理香",
- "めいや" => "桜井めいや",
- "People1_4" => "先生",
- }
-
- end
- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # ゲーム中のすべてのウィンドウのスーパークラスです。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ☆ オブジェクト初期化
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_initialize initialize
- def initialize(x, y, width, height)
- a1_name_window_window_base_initialize(x, y, width, height)
- create_name_window
- end
- #--------------------------------------------------------------------------
- # ☆ フレーム更新
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_update update
- def update
- a1_name_window_window_base_update
- update_name_window
- end
- #--------------------------------------------------------------------------
- # ☆ 顔グラフィックの描画
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_draw_face draw_face
- def draw_face(face_name, face_index, x, y, size = 96)
- a1_name_window_window_base_draw_face(face_name, face_index, x, y, size)
- show_name_window(face_name, face_index, x, size)
- end
- #--------------------------------------------------------------------------
- # ☆ ウィンドウを閉じる
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_close close
- def close
- a1_name_window_window_base_close
-
- return if @name_sprite == nil
- return if @name_window == nil
-
- name_window_close
- @name_sprite.visible = false
- @prev_show_name = ""
- @prev_x = 0
- end
- #--------------------------------------------------------------------------
- # ☆ 解放
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_dispose dispose
- def dispose
- a1_name_window_window_base_dispose
-
- return if @name_sprite == nil
- return if @name_window == nil
- dispose_name_window
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの解放
- #--------------------------------------------------------------------------
- def dispose_name_window
- return if @name_sprite == nil
- return if @name_window == nil
-
- @name_sprite.bitmap.dispose if @name_sprite.bitmap != nil
- @name_sprite.bitmap = nil
-
- @name_sprite.dispose
- @name_window.dispose
-
- @name_sprite = nil
- @name_window = nil
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの更新
- #--------------------------------------------------------------------------
- def update_name_window
-
- return if @name_sprite == nil
- return if @name_window == nil
-
- @name_sprite.update
- @name_window.update
- @name_window.tone.set($game_system.window_tone)
-
- if @name_window.openness == 255
- @name_sprite.visible = true
- end
- if @name_window_opening
-
- if self.openness == 255
- @name_window.openness += 48
- else
- @name_window.openness = self.openness
- end
- if @name_window.openness == 255
- @name_sprite.visible = true
- @name_window_opening = false
- end
-
- elsif @name_window_closing
- @name_sprite.visible = false
- @name_window.openness -= 48
- @name_window_closing = false if @name_window.openness == 0
- end
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの作成
- #--------------------------------------------------------------------------
- def use_name_window?
- for c in A1_System::NameWindow::USE_NAME_WINDOW_CLASS
- return true if self.is_a?(c)
- end
- return false
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの作成
- #--------------------------------------------------------------------------
- def create_name_window
-
- # ネームウィンドウを使用しないクラスならreturn
- return unless use_name_window?
-
- @name_window_opening = false
- @name_window_closing = false
-
- # 名前用スプライト
- @name_sprite = Sprite.new
- @name_sprite.visible = false
-
- # ネームウィンドウ
- skin = Cache.system("Window").clone
- skin.clear_rect(80, 16, 32, 32)
- @name_window = Window.new
- @name_window.windowskin = skin
- @name_window.visible = true
- @name_window.openness = 0
-
- # 前に表示した名前
- @prev_show_name = ""
- end
- #--------------------------------------------------------------------------
- # ○ 表示する名前の取得
- #--------------------------------------------------------------------------
- def show_name(face_name, face_index)
- return nil unless $game_system.use_name_window
- return nil if @name_sprite == nil
- return nil if face_name == nil
- return nil if face_name.empty?
-
- name = A1_System::NameWindow::NAME_LIST[sprintf("%s_%d", face_name, face_index)]
- name = A1_System::NameWindow::NAME_LIST[face_name] if name == nil
- return name
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの表示
- #--------------------------------------------------------------------------
- def show_name_window(face_name, face_index, x, size = 96)
-
- return if @name_sprite == nil
- return if @name_window == nil
-
- name = show_name(face_name, face_index)
-
- if name == nil or name.empty?
- name_window_close
- @name_sprite.visible = false
- @prev_show_name = ""
- return
- end
- return if @prev_show_name == name and @prev_x == x
-
- @name_sprite.bitmap.dispose if @name_sprite.bitmap != nil
- @name_sprite.bitmap = nil
-
- @prev_show_name = name
- @prev_x = x
-
- # 計算用ダミービットマップ
- bitmap = Cache.system("")
- bitmap.font.name = A1_System::NameWindow::NAME_FONT
- bitmap.font.size = 16
- tw = bitmap.text_size(name).width + 8
-
- # ビットマップ作成
- bitmap = Bitmap.new(tw, bitmap.font.size + 4)
- bitmap.font.name = A1_System::NameWindow::NAME_FONT
- bitmap.font.size = 16
- bitmap.font.color = Color.new(255,255,255)
- bitmap.draw_text(0, 0, bitmap.width, bitmap.height, name, 1)
-
- # スプライト設定
- @name_sprite.bitmap = bitmap
- @name_sprite.ox = bitmap.width / 2
- @name_sprite.oy = bitmap.height / 2
- @name_sprite.visible = true
-
- # ネームウィンドウリサイズ
- @name_window.width = bitmap.width + 8
- @name_window.height = bitmap.height + 8
-
- @name_window.x = x + size + 20
- @name_window.y = self.y - 16
- @name_window.z = self.z + 10
-
- if @name_window.x + @name_window.width > Graphics.width
- @name_window.x = Graphics.width - @name_window.width
- end
-
- @name_sprite.x = @name_window.x + @name_window.width / 2
- @name_sprite.y = @name_window.y + @name_window.height / 2
- @name_sprite.z = self.z + 20
-
- name_window_open
-
- if @name_window_opening
- @name_sprite.visible = false
- end
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウを開く
- #--------------------------------------------------------------------------
- def name_window_open
- @name_window_opening = true if @name_window.openness < 255
- @name_window_closing = false
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウを閉じる
- #--------------------------------------------------------------------------
- def name_window_close
- return if @name_sprite == nil
- return if @name_window == nil
- @name_window_closing = true if @name_window.openness > 0
- @name_window_opening = false
- @name_sprite.visible = false
- @prev_show_name = ""
- end
- end
- #==============================================================================
- # ■ Window_Message
- #------------------------------------------------------------------------------
- # 文章表示に使うメッセージウィンドウです。
- #==============================================================================
- class Window_Message < Window_Base
- #--------------------------------------------------------------------------
- # ☆ 改ページ処理
- #--------------------------------------------------------------------------
- alias a1_name_window_window_message_new_page new_page
- def new_page(text, pos)
- name_window_close if $game_message.face_name.empty?
- a1_name_window_window_message_new_page(text, pos)
- end
- end
- #==============================================================================
- # ■ Game_System
- #------------------------------------------------------------------------------
- # システム周りのデータを扱うクラスです。乗り物や BGM などの管理も行います。
- # このクラスのインスタンスは $game_system で参照されます。
- #==============================================================================
- class Game_System
- #--------------------------------------------------------------------------
- # ○ 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :use_name_window # ネームウィンドウ表示フラグ
- #--------------------------------------------------------------------------
- # ☆ オブジェクト初期化
- #--------------------------------------------------------------------------
- alias a1_name_window_game_system_initialize initialize
- def initialize
- a1_name_window_game_system_initialize
- @use_name_window = false
- end
- end
- #==============================================================================
- # ■ Game_Interpreter
- #------------------------------------------------------------------------------
- # イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
- # Game_Troop クラス、Game_Event クラスの内部で使用されます。
- #==============================================================================
- class Game_Interpreter
-
- #--------------------------------------------------------------------------
- # ☆ 注釈の実行
- #--------------------------------------------------------------------------
- alias a1_name_window_proc_comment_command proc_comment_command
- def proc_comment_command(command, params)
-
- if command == "ネームウィンドウ"
- case params[0]
- when "on"
- $game_system.use_name_window = true
- when "off"
- $game_system.use_name_window = false
- end
- else
- a1_name_window_proc_comment_command(command, params)
- end
- end
- end
- end
复制代码
这个是新版本的代码
- #===========================================================================
- # ◆ A1 Scripts ◆
- # ネームウィンドウ(RGSS2/RGSS3共用)
- #
- # バージョン : 2.40 (2012/01/19)
- # 作者 : A1
- # URL : ht(防和谐)tp://a1tktk.web.fc2.com/
- #---------------------------------------------------------------------------
- # 機能:
- # ・ネームウィンドウを表示します
- #---------------------------------------------------------------------------
- # 更新履歴 :2011/12/15 Ver1.00 リリース
- # :2011/12/29 Ver1.10 アクター名表示対応
- # :2011/12/30 Ver2.00 左右顔グラフィック対応
- # :2011/12/30 Ver2.00 表示位置「上」対応
- # :2011/12/30 Ver2.10 RGSS2対応
- # :2011/12/30 Ver2.11 名前が切り替わる度にウィンドウを閉じる不具合を修正
- # :2012/01/02 Ver2.20 同じ顔グラフィックの別名表示機能追加
- # :2012/01/02 Ver2.20 表示名の直接指定機能追加
- # :2012/01/02 Ver2.30 A1共通スクリプトVer3.30対応
- # :2012/01/19 Ver2.40 バトルネームウィンドウ対応
- #---------------------------------------------------------------------------
- # 設置場所
- # A1共通スクリプトより下
- # (左右顔グラフィックスクリプトより下)
- #
- # 必要スクリプト
- # A1共通スクリプトVer3.30以上
- #---------------------------------------------------------------------------
- # 使い方
- # 設定項目を設定します
- #
- # 設定項目の「表示する名前」を Actor[ID] とすると
- # IDで指定したアクターの名前を表示します
- #
- # イベントコマンド「注釈」に記述
- #
- # ネームウィンドウ on|off
- # 表示の on/off を切り替えます
- #
- # NWインデックス index
- # 同じ顔グラフィックに複数の名前を配列で登録している場合
- # 次に表示するネームウィンドウを指定した index の名前を使用します
- # 省略時には 0番目 の名前を使用します
- #
- # NW名前指定 Name
- # 次に表示するネームウィンドウに Name を使用します
- # 顔グラフィックなしでも表示されます
- #==============================================================================
- $imported ||= {}
- $imported["A1_Name_Window"] = true
- if $imported["A1_Common_Script"]
- old_common_script("ネームウィンドウ", "3.30") if common_version < 3.30
- #==============================================================================
- # ■ 設定項目
- #==============================================================================
- module A1_System::NameWindow
- #--------------------------------------------------------------------------
- # ネームウィンドウを使用するクラス
- #--------------------------------------------------------------------------
- USE_NAME_WINDOW_CLASS = [Window_Message]
-
- #--------------------------------------------------------------------------
- # ネームウィンドウのフォント
- #--------------------------------------------------------------------------
- NAME_FONT = "UmePlus Gothic"
-
- #--------------------------------------------------------------------------
- # 長い名前の時に左(右)に寄せる
- #--------------------------------------------------------------------------
- FIX_LONG_NAME = false
-
- #--------------------------------------------------------------------------
- # 顔グラフィックと名前の対応
- #
- # "[ファイル名]_[Index]" => "表示する名前" ※Index毎に設定
- # "[ファイル名]" => "表示する名前" ※該当ファイル全てに適用
- # "Actor[ID]" ※該当するIDのアクター名を表示
- #--------------------------------------------------------------------------
- NAME_LIST = {
- "Actor4_0" => "エリック",
- "Actor4_4" => "アーネスト",
- "Actor4_5" => "ティファ",
- }
- end
- #==============================================================================
- # ■ Cache
- #------------------------------------------------------------------------------
- # 各種グラフィックを読み込み、Bitmap オブジェクトを作成、保持するモジュール
- # です。読み込みの高速化とメモリ節約のため、作成した Bitmap オブジェクトを内部
- # のハッシュに保存し、同じビットマップが再度要求されたときに既存のオブジェクト
- # を返すようになっています。
- #==============================================================================
- module Cache
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウ用ビットマップの取得
- #--------------------------------------------------------------------------
- def self.name_bitmap(name)
- return load_name_bitmap(name)
- end
- #--------------------------------------------------------------------------
- # ○ 名前bitmapの作成
- #--------------------------------------------------------------------------
- def self.load_name_bitmap(name)
- @cache ||= {}
- key = [name, "name_window"]
- return @cache[key] if include?(key)
-
- # 計算用ダミービットマップ
- bitmap = Cache.system("")
- bitmap.font.name = A1_System::NameWindow::NAME_FONT
- bitmap.font.size = 16
- tw = bitmap.text_size(name).width + 8
-
- # ビットマップ作成
- bitmap = Bitmap.new(tw, bitmap.font.size + 4)
- bitmap.font.name = A1_System::NameWindow::NAME_FONT
- bitmap.font.size = 16
- bitmap.font.color = Color.new(255,255,255)
- bitmap.draw_text(0, 0, bitmap.width, bitmap.height, name, 1)
-
- @cache[key] = bitmap
- return @cache[key]
- end
- end
- #==============================================================================
- # ■ Window_FaceName
- #==============================================================================
- class Window_FaceName < Window_Base
- #--------------------------------------------------------------------------
- # ○ オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(name, z)
- info = create_name_sprite(name)
- super(0, 0, info[0], info[1])
- self.visible = true
- self.openness = 0
- self.z = z
- skin = Cache.system("Window").clone
- skin.clear_rect(80, 16, 32, 32)
- self.windowskin = skin
- @name_sprite.z = self.z + 10
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウのセットアップ
- #--------------------------------------------------------------------------
- def setup_name_window(name)
- info = create_name_sprite(name)
- self.width = info[0]
- self.height = info[1]
- create_contents
- @name_sprite.z = self.z + 10
- end
- #--------------------------------------------------------------------------
- # ○ フレーム更新
- #--------------------------------------------------------------------------
- def update
- super
- @name_sprite.visible = self.visible && self.open?
- return unless self.open?
- @name_sprite.update
- end
- #--------------------------------------------------------------------------
- # ○ 解放
- #--------------------------------------------------------------------------
- def dispose
- @name_sprite.bitmap.dispose
- @name_sprite.dispose
- super
- end
- #--------------------------------------------------------------------------
- # ○ ウィンドウを開く
- #--------------------------------------------------------------------------
- def open
- super
- @name_sprite.x = self.x + self.width / 2
- @name_sprite.y = self.y + self.height / 2
- end
- #--------------------------------------------------------------------------
- # ○ スプライトの作成
- #--------------------------------------------------------------------------
- def create_name_sprite(name)
- # ビットマップの取得
- bitmap = Cache.name_bitmap(name)
-
- # スプライト設定
- @name_sprite = Sprite.new
- @name_sprite.bitmap = bitmap
- @name_sprite.ox = bitmap.width / 2
- @name_sprite.oy = bitmap.height / 2
- @name_sprite.visible = false
-
- return [bitmap.width + 8, bitmap.height + 8]
- end
- end
- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # ゲーム中のすべてのウィンドウのスーパークラスです。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ☆ オブジェクト初期化
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_initialize initialize
- def initialize(x, y, width, height)
- a1_name_window_window_base_initialize(x, y, width, height)
- create_name_window
- end
- #--------------------------------------------------------------------------
- # ☆ フレーム更新
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_update update
- def update
- a1_name_window_window_base_update
- update_name_window
- end
- #--------------------------------------------------------------------------
- # ☆ 顔グラフィックの描画
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_draw_face draw_face
- def draw_face(face_name, face_index, x, y, size = 96)
- a1_name_window_window_base_draw_face(face_name, face_index, x, y, size)
- show_name_window(face_name, face_index, x, size)
- end
- #--------------------------------------------------------------------------
- # ☆ ウィンドウを閉じる
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_close close
- def close
- a1_name_window_window_base_close
- end
- #--------------------------------------------------------------------------
- # ☆ 解放
- #--------------------------------------------------------------------------
- alias a1_name_window_window_base_dispose dispose
- def dispose
- a1_name_window_window_base_dispose
- dispose_name_window
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの解放
- #--------------------------------------------------------------------------
- def dispose_name_window
- @name_windows.values.each {|window| window.dispose }
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの更新
- #--------------------------------------------------------------------------
- def update_name_window
- @name_windows.values.each {|window| window.update }
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウを使用?
- #--------------------------------------------------------------------------
- def use_name_window?
- A1_System::NameWindow::USE_NAME_WINDOW_CLASS.each {|clas| return true if self.is_a?(clas) }
- return false
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの作成
- #--------------------------------------------------------------------------
- def create_name_window
- @name_windows = {}
- end
- #--------------------------------------------------------------------------
- # ○ 表示する名前の取得
- #--------------------------------------------------------------------------
- def show_name(face_name, face_index)
- return nil unless $game_system.use_name_window
- name = $game_temp.direct_show_name
- if name.empty?
- return nil if face_name == nil || face_name.empty?
- name = A1_System::NameWindow::NAME_LIST[sprintf("%s_%d", face_name, face_index)]
- name = A1_System::NameWindow::NAME_LIST[face_name] if name == nil
- name = name[$game_temp.name_index] if name.is_a?(Array)
- name = $game_actors[$1.to_i].name if name =~ /Actor\[(\d+)\]/
- end
- $game_temp.name_index = 0
- $game_temp.direct_show_name = ""
- return name
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウの表示
- #--------------------------------------------------------------------------
- def show_name_window(face_name, face_index, x, size = 96)
- return unless use_name_window?
- name = show_name(face_name, face_index)
- return if name == nil or name.empty?
- @name_windows[name] ||= Window_FaceName.new(name, self.z + 10)
- if x <= Graphics.width / 2
- @name_windows[name].x = x + size + 20
- @name_windows[name].x = 0 if @name_windows[name].x + @name_windows[name].width > Graphics.width / 2 and A1_System::NameWindow::FIX_LONG_NAME
- else
- @name_windows[name].x = Graphics.width - size - @name_windows[name].width
- @name_windows[name].x = Graphics.width - @name_windows[name].width if @name_windows[name].x < Graphics.width / 2 and A1_System::NameWindow::FIX_LONG_NAME
- end
- @name_windows[name].y = self.y - 16 if self.y > 0
- @name_windows[name].y = self.height - 16 if self.y == 0
- @name_windows[name].openness = 255 if self.open?
- @name_windows[name].open
- @name_windows[name].visible = true
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウを閉じる
- #--------------------------------------------------------------------------
- def name_window_close
- @name_windows.values.each {|window| window.close }
- end
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウを非表示
- #--------------------------------------------------------------------------
- def name_window_visible_false
- @name_windows.values.each {|window| window.visible = false }
- end
- end
- #==============================================================================
- # ■ Window_Message
- #------------------------------------------------------------------------------
- # 文章表示に使うメッセージウィンドウです。
- #==============================================================================
- class Window_Message
- #--------------------------------------------------------------------------
- # ○ ウィンドウを閉じる
- #--------------------------------------------------------------------------
- def close
- name_window_close
- super
- end
- end
- #==============================================================================
- # ◆ RGSS3用処理
- #==============================================================================
- if rgss_version == 3
- #==============================================================================
- # ■ Window_Message
- #------------------------------------------------------------------------------
- # 文章表示に使うメッセージウィンドウです。
- #==============================================================================
- class Window_Message < Window_Base
- #--------------------------------------------------------------------------
- # ☆ 改ページ処理
- #--------------------------------------------------------------------------
- alias a1_name_window_window_message_new_page new_page
- def new_page(text, pos)
- name_window_visible_false
- a1_name_window_window_message_new_page(text, pos)
- end
- end
- #==============================================================================
- # ◆ RGSS2用処理
- #==============================================================================
- elsif rgss_version == 2
- #==============================================================================
- # ■ Window_Message
- #------------------------------------------------------------------------------
- # 文章表示に使うメッセージウィンドウです。
- #==============================================================================
- class Window_Message < Window_Selectable
- #--------------------------------------------------------------------------
- # ☆ 改ページ処理
- #--------------------------------------------------------------------------
- alias a1_name_window_window_message_new_page new_page
- def new_page
- name_window_visible_false
- a1_name_window_window_message_new_page
- end
- end
- #==============================================================================
- # ◆ RGSS用処理
- #==============================================================================
- elsif rgss_version == 1
- end
- #==============================================================================
- # ■ Game_System
- #------------------------------------------------------------------------------
- # システム周りのデータを扱うクラスです。乗り物や BGM などの管理も行います。
- # このクラスのインスタンスは $game_system で参照されます。
- #==============================================================================
- class Game_System
- #--------------------------------------------------------------------------
- # ○ 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :use_name_window # ネームウィンドウ表示フラグ
- #--------------------------------------------------------------------------
- # ☆ オブジェクト初期化
- #--------------------------------------------------------------------------
- alias a1_name_window_game_system_initialize initialize
- def initialize
- a1_name_window_game_system_initialize
- @use_name_window = false
- end
- end
- #==============================================================================
- # ■ Game_Temp
- #------------------------------------------------------------------------------
- # セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン
- # スタンスは $game_temp で参照されます。
- #==============================================================================
- class Game_Temp
- #--------------------------------------------------------------------------
- # ○ 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :name_index
- attr_accessor :direct_show_name
- #--------------------------------------------------------------------------
- # ☆ オブジェクト初期化
- #--------------------------------------------------------------------------
- alias a1_name_window_gt_initialize initialize
- def initialize
- a1_name_window_gt_initialize
- @name_index = 0
- @direct_show_name = ""
- end
- end
- #==============================================================================
- # ■ A1_System::CommonModule
- #==============================================================================
- class A1_System::CommonModule
- #--------------------------------------------------------------------------
- # ☆ 注釈コマンド定義
- #--------------------------------------------------------------------------
- alias a1_name_window_define_command define_command
- def define_command
- a1_name_window_define_command
- @cmd_108["ネームウィンドウ"] = :name_window
- @cmd_108["NWインデックス"] = :nw_index
- @cmd_108["NW名前指定"] = :nw_set_name
- end
- end
- #==============================================================================
- # ■ Game_Interpreter
- #------------------------------------------------------------------------------
- # イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
- # Game_Troop クラス、Game_Event クラスの内部で使用されます。
- #==============================================================================
- class Game_Interpreter
- #--------------------------------------------------------------------------
- # ○ ネームウィンドウ
- #--------------------------------------------------------------------------
- def name_window(params)
- $game_system.use_name_window = params[0] == "on" ? true : false
- end
- #--------------------------------------------------------------------------
- # ○ NWインデックス
- #--------------------------------------------------------------------------
- def nw_index(params)
- $game_temp.name_index = params[0].to_i
- end
- #--------------------------------------------------------------------------
- # ○ NW名前指定
- #--------------------------------------------------------------------------
- def nw_set_name(params)
- $game_temp.direct_show_name = params[0]
- end
- end
- end
复制代码
|
|