| 赞 | 0  | 
 
| VIP | 2 | 
 
| 好人卡 | 2 | 
 
| 积分 | 1 | 
 
| 经验 | 19578 | 
 
| 最后登录 | 2016-1-22 | 
 
| 在线时间 | 262 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 50 
 
        - 在线时间
 - 262 小时
 
        - 注册时间
 - 2009-1-10
 
        - 帖子
 - 309
 
 
 
 | 
	
- #==============================================================================
 
 - # 半身像对话框功能版 v 1.01 by 沉影不器
 
 - #------------------------------------------------------------------------------
 
 - # 使用说明:
 
 - #   ① 此脚本可代替默认 Window_Message 全脚本
 
 - #
 
 - #   ② 对话框第一行输入引号内文字"名称:",脚本会把名称提取出来美化显示
 
 - #
 
 - #   ③ 默认半身像在左边显示
 
 - #      当您需要右边显示时,在第一行输入的名称之后加"@r"(大小写不限)
 
 - #      例: "拉尔夫@r:"
 
 - #          请注意此时半身像将进行左右翻转显示
 
 - #
 
 - #   ④ 在对话中更改字体的方法:
 
 - #       \f[sX]:更改字号为X
 
 - #       \f[nX]:更改字体名称为预设字体组第X号字体 (预设字体组请看参数设定)
 
 - #       \f[cX]:更改字色为第X号颜色 (text_color中的定义)
 
 - #
 
 - #   ⑤ 在对话中显示(技能 物品 武器 防具)图标和名称的方法:
 
 - #       \s[X]: 显示第X号技能图标和名称
 
 - #       \i[X]: 显示第X号物品图标和名称
 
 - #       \w[X]: 显示第X号武器图标和名称
 
 - #       \a[X]: 显示第X号防具图标和名称
 
 - #
 
 - #   ⑥ 在对话中更改文字不透明度的方法:
 
 - #       \o[X]: 把文字不透明度更改为X (取值范围在0~255)
 
 - #
 
 - #   ⑦ 指定时间后自动关闭对话框的方法:
 
 - #       \x[X]: 对话框将在X帧后自动关闭
 
 - #       \x:    省略参数时,将在AUTO_CLOSE帧后自动关闭 (AUTO_CLOSE在参数设定中)
 
 - #
 
 - #   ⑧ 由于半身像占据文字显示宽度,您在设定文章时每行字数将减少
 
 - #
 
 - #   ⑨ 参数设定在脚本第37~66行
 
 - #
 
 - # 素材要求:
 
 - #   ① 按vx默认头像像素材(Graphics\Faces)的格式
 
 - #      要求所有半身像朝向一致(默认是正面偏右)
 
 - #==============================================================================
 
 - # ■ Window_Message
 
 - #==============================================================================
 
 - class Window_Message < Window_Selectable
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 参数设定
 
 -   #--------------------------------------------------------------------------
 
 -   # 预设字体组
 
 -   FONT_ARRAY = ["黑体", "宋体", "仿宋_GB2312"]
 
 -   
 
 -   # 名称条参数
 
 -   NAME_FONT_NAME = 0            # 名称文字字体在预设字体组中的序号
 
 -   NAME_FONT_SIZE = 20           # 名称文字字号
 
 -   NAME_FONT_COLOR = 16          # 名称文字颜色
 
 -   NAME_X_ADJ = 6                # 名称条宽度缩进值
 
 -   NAME_Y_ADJ = 6                # 名称与对话内容之间的附加距离
 
 -   NAME_BAR_COLOR = 0            # 名称背景条颜色
 
 -   NAME_BAR_OPACITY = 72         # 名称背景条透明度
 
 -   AUTO_ADD = true               # 是否自动添加名称修饰符
 
 -   SYMBOL = "┣┫"               # AUTO_ADD有效时为名称添加的修饰符(一对)
 
 -   # 半身像参数
 
 -   FACE_X_ADJ = 6                # 半身像横坐标微调
 
 -   FACE_Y_ADJ = -6               # 半身像纵坐标微调
 
 -   # 对话框参数
 
 -   MSG_FONT_NAME = 1             # 对话文字字体在预设字体组中的序号
 
 -   MSG_FONT_SIZE = 18            # 对话文字字号
 
 -   MSG_FONT_COLOR = 0            # 对话文字颜色
 
 -   # 自动关闭
 
 -   AUTO_CLOSE = 80               # 默认自动关闭时间(以帧计时)
 
 -   
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 常量
 
 -   #--------------------------------------------------------------------------
 
 -   MAX_LINE = 4                            # 最大行数
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 初始化对象
 
 -   #--------------------------------------------------------------------------
 
 -   def initialize
 
 -     height = [NAME_FONT_SIZE, MSG_FONT_SIZE].max + 2 +
 
 -              ( MSG_FONT_SIZE + 2) * 3 + NAME_Y_ADJ + 32
 
 -     y = Graphics.height - height
 
 -     super(0, y, Graphics.width, height)
 
 -     self.z = 200
 
 -     self.active = false
 
 -     self.index = -1
 
 -     self.openness = 0
 
 -     @opening = false            # 窗口正在打开的标志
 
 -     @closing = false            # 窗口正在关闭的标志
 
 -     @text = nil                 # 已经没有可显示的文章
 
 -     @contents_x = 0             # 下一条文字描绘的 X 坐标
 
 -     @contents_y = 0             # 下一条文字描绘的 Y 坐标
 
 -     @line_count = 0             # 现在描绘的行数
 
 -     @wait_count = 0             # 等待计数
 
 -     @background = 0             # 背景类型
 
 -     @position = 2               # 显示位置
 
 -     @show_fast = false          # 快速显示标志
 
 -     @line_show_fast = false     # 以行为单位快速显示
 
 -     @pause_skip = false         # 省略等待输入标志
 
 -     create_gold_window
 
 -     create_number_input_window
 
 -     create_back_sprite
 
 -     # 半身像左右判断
 
 -     @show_right = false
 
 -     # 半身像宽度
 
 -     @face_width = 0
 
 -     # 生成名称背景条
 
 -     create_namebar_sprite
 
 -     # 生成半身像
 
 -     create_face_sprite
 
 -     # 修改默认字体
 
 -     contents.font = get_font(1)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 释放
 
 -   #--------------------------------------------------------------------------
 
 -   def dispose
 
 -     super
 
 -     dispose_gold_window
 
 -     dispose_number_input_window
 
 -     dispose_back_sprite
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 更新画面
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     super
 
 -     update_gold_window
 
 -     update_number_input_window
 
 -     update_back_sprite
 
 -     update_show_fast
 
 -     unless @opening or @closing             # 除窗口关闭以外
 
 -       if @wait_count > 0                    # 文章内等待中
 
 -         @wait_count -= 1
 
 -       elsif self.pause                      # 等待文章翻页待机中
 
 -         input_pause
 
 -       elsif self.active                     # 正在输入选择项
 
 -         input_choice
 
 -       elsif @number_input_window.visible    # 正在输入数值
 
 -         input_number
 
 -       elsif @text != nil                    # 还有剩余的文章
 
 -         update_message                        # 更新消息
 
 -       elsif continue?                       # 继续的情况
 
 -         start_message                         # 开始消息
 
 -         open                                  # 打开窗口
 
 -         $game_message.visible = true
 
 -       else                                  # 不继续的情况
 
 -         close                                 # 关闭窗口
 
 -         $game_message.visible = @closing
 
 -       end
 
 -     end
 
 -     # 自动关闭对话框
 
 -     if @auto_close != nil
 
 -       if @auto_close > 0
 
 -         @auto_close -= 1
 
 -       else
 
 -         @auto_close = nil
 
 -         terminate_message
 
 -       end
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 生成所持金窗口
 
 -   #--------------------------------------------------------------------------
 
 -   def create_gold_window
 
 -     @gold_window = Window_Gold.new(384, 0)
 
 -     @gold_window.openness = 0
 
 -     # 统一字体
 
 -     @gold_window.contents.font = get_font(1)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 生成数值输入窗口
 
 -   #--------------------------------------------------------------------------
 
 -   def create_number_input_window
 
 -     @number_input_window = Window_NumberInput.new
 
 -     @number_input_window.visible = false
 
 -     # 统一字体
 
 -     @number_input_window.contents.font = get_font(1)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 生成背景活动块
 
 -   #--------------------------------------------------------------------------
 
 -   def create_back_sprite
 
 -     @back_sprite = Sprite.new
 
 -     @back_sprite.bitmap = Cache.system("MessageBack")
 
 -     @back_sprite.visible = (@background == 1)
 
 -     @back_sprite.z = 190
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 释放所持金窗口
 
 -   #--------------------------------------------------------------------------
 
 -   def dispose_gold_window
 
 -     @gold_window.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 释放数值输入窗口
 
 -   #--------------------------------------------------------------------------
 
 -   def dispose_number_input_window
 
 -     @number_input_window.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 释放背景活动块
 
 -   #--------------------------------------------------------------------------
 
 -   def dispose_back_sprite
 
 -     @back_sprite.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 更新所持金窗口
 
 -   #--------------------------------------------------------------------------
 
 -   def update_gold_window
 
 -     @gold_window.update
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 更新数值输入窗口
 
 -   #--------------------------------------------------------------------------
 
 -   def update_number_input_window
 
 -     @number_input_window.update
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 更新背景活动块
 
 -   #--------------------------------------------------------------------------
 
 -   def update_back_sprite
 
 -     @back_sprite.visible = (@background == 1)
 
 -     @back_sprite.y = y - 16
 
 -     @back_sprite.opacity = openness
 
 -     @back_sprite.update
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 更新快速显示标志
 
 -   #--------------------------------------------------------------------------
 
 -   def update_show_fast
 
 -     if self.pause or self.openness < 255
 
 -       @show_fast = false
 
 -     elsif Input.trigger?(Input::C) and @wait_count < 2
 
 -       @show_fast = true
 
 -     elsif not Input.press?(Input::C)
 
 -       @show_fast = false
 
 -     end
 
 -     if @show_fast and @wait_count > 0
 
 -       @wait_count -= 1
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 判断下一消息继续显示
 
 -   #--------------------------------------------------------------------------
 
 -   def continue?
 
 -     return true if $game_message.num_input_variable_id > 0
 
 -     return false if $game_message.texts.empty?
 
 -     if self.openness > 0 and not $game_temp.in_battle
 
 -       return false if @background != $game_message.background
 
 -       return false if @position != $game_message.position
 
 -     end
 
 -     return true
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 开始显示消息
 
 -   #--------------------------------------------------------------------------
 
 -   def start_message
 
 -     # 重设窗口背景与位置
 
 -     reset_window
 
 -     # 还原半身像左右判断
 
 -     @show_right = false
 
 -     # 暂存消息
 
 -     temp_texts = []
 
 -     $game_message.texts.each {|text| temp_texts.push(text.clone)}
 
 -     if temp_texts[0] != nil and temp_texts[0].include?(":")
 
 -       # 半身像左右判断
 
 -       if temp_texts[0].split(/@/)[1] =~ /[Rr]/
 
 -         @show_right = true
 
 -         temp_texts[0] = temp_texts[0].split(/@/)[0]
 
 -       end
 
 -       # 去冒号加修饰符(可选)
 
 -       if AUTO_ADD
 
 -         temp_texts[0].sub!(/\:/) { "" }
 
 -         temp_texts[0] = SYMBOL[0,SYMBOL.size/2] +
 
 -         temp_texts[0] + SYMBOL[SYMBOL.size/2,SYMBOL.size/2]
 
 -       end
 
 -       # 设定文字颜色
 
 -       temp_texts[0] = "\\C[#{NAME_FONT_COLOR}]" +
 
 -       temp_texts[0] + "\\C[#{MSG_FONT_COLOR}]"
 
 -       # 设定文字字体
 
 -       temp_texts[0] = "\\F[N#{NAME_FONT_NAME}]" +
 
 -       temp_texts[0] + "\\F[N#{MSG_FONT_NAME}]"
 
 -       # 显示名称背景条
 
 -       show_namebar_sprite
 
 -     end
 
 -     @text = ""
 
 -     for i in 0...temp_texts.size
 
 -       @text += "  " if i >= $game_message.choice_start
 
 -       @text += temp_texts[i].clone + "\x00"
 
 -     end
 
 -     @item_max = $game_message.choice_max
 
 -     convert_special_characters
 
 -     ##reset_window
 
 -     new_page
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 更换页面处理
 
 -   #--------------------------------------------------------------------------
 
 -   def new_page
 
 -     contents.clear
 
 -     # 初始化文字描绘起点
 
 -     @contents_x = 0
 
 -     # 除名称外文字右移1字符
 
 -     @contents_x += MSG_FONT_SIZE+2 unless show_name?
 
 -     if $game_message.face_name.empty?
 
 -       @face_sprite.bitmap.clear
 
 -     else
 
 -       name = $game_message.face_name
 
 -       index = $game_message.face_index
 
 -       # 获取半身像宽度
 
 -       get_face_width(name)
 
 -       # 计算文字横坐标起始
 
 -       @contents_x += @face_width-16 unless @show_right
 
 -       draw_msg_face(name, index)
 
 -       # 设定半身像坐标
 
 -       set_face_pos
 
 -     end
 
 -     @contents_y = 0
 
 -     @line_count = 0
 
 -     @show_fast = false
 
 -     @line_show_fast = false
 
 -     @pause_skip = false
 
 -     contents.font.color = text_color(0)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 换行处理
 
 -   #--------------------------------------------------------------------------
 
 -   def new_line
 
 -     @contents_x = 0
 
 -     unless $game_message.face_name.empty?
 
 -       # 半身像显示在左时
 
 -       @contents_x = @face_width-16 unless @show_right
 
 -     end
 
 -     # 除名称外文字右移1字符
 
 -     @contents_x += (MSG_FONT_SIZE+2)
 
 -     # 显示名称之后,对话内容下移 NAME_Y_ADJ
 
 -     @contents_y += NAME_Y_ADJ if @line_count == 0 and show_name?
 
 -     # 以字号为新间距
 
 -     @contents_y += (MSG_FONT_SIZE+2)
 
 -     @line_count += 1
 
 -     @line_show_fast = false
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 特殊文字变换
 
 -   #--------------------------------------------------------------------------
 
 -   def convert_special_characters
 
 -     @text.gsub!(/\\V\[(\d+)\]/i)  { $game_variables[$1.to_i] }
 
 -     @text.gsub!(/\\V\[(\d+)\]/i)  { $game_variables[$1.to_i] }
 
 -     @text.gsub!(/\\N\[(\d+)\]/i)  { $game_actors[$1.to_i].name }
 
 -     @text.gsub!(/\\C\[(\d+)\]/i)  { "\x01[#{$1}]" }
 
 -     @text.gsub!(/\\G/)            { "\x02" }
 
 -     @text.gsub!(/\\\./)           { "\x03" }
 
 -     @text.gsub!(/\\\|/)           { "\x04" }
 
 -     @text.gsub!(/\\!/)            { "\x05" }
 
 -     @text.gsub!(/\\>/)            { "\x06" }
 
 -     @text.gsub!(/\\</)            { "\x07" }
 
 -     @text.gsub!(/\\\^/)           { "\x08" }
 
 -     @text.gsub!(/\\\\/)           { "\\" }
 
 -     # 更改不透明度
 
 -     @text.gsub!(/\\O\[(\d+)\]/i)  { "\x09[#{$1}]" }
 
 -     # 显示数据库元素
 
 -     @text.gsub!(/\\S\[(\d+)\]/i)  { "\x10[#{$1}]" + $data_skills[$1.to_i].name }
 
 -     @text.gsub!(/\\I\[(\d+)\]/i)  { "\x11[#{$1}]" + $data_items[$1.to_i].name }
 
 -     @text.gsub!(/\\W\[(\d+)\]/i)  { "\x12[#{$1}]" + $data_weapons[$1.to_i].name }
 
 -     @text.gsub!(/\\A\[(\d+)\]/i)  { "\x13[#{$1}]" + $data_armors[$1.to_i].name }
 
 -     # 更改字体
 
 -     @text.gsub!(/\\F\[S(\d+)\]/i) { "\x14[#{$1}]" }
 
 -     @text.gsub!(/\\F\[N(\d+)\]/i) { "\x15[#{$1}]" }
 
 -     @text.gsub!(/\\F\[C(\d+)\]/i) { "\x16[#{$1}]" }
 
 -     # 自动关闭
 
 -     @text.gsub!(/\\X\[(\d+)\]/i)  { "\x17[#{$1}]" }
 
 -     @text.gsub!(/\\X/i)            { "\x18" }
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 设置窗口背景与位置
 
 -   #--------------------------------------------------------------------------
 
 -   def reset_window
 
 -     @background = $game_message.background
 
 -     @position = $game_message.position
 
 -     if @background == 0   # 普通窗口
 
 -       self.opacity = 255
 
 -     else                  # 背景变暗、透明
 
 -       self.opacity = 0
 
 -     end
 
 -     case @position
 
 -     when 0  # 上
 
 -       self.y = 0
 
 -       @gold_window.y = 360
 
 -     when 1  # 中
 
 -       # 通过计算获取
 
 -       self.y = (Graphics.height-self.height)/2
 
 -       @gold_window.y = 0
 
 -     when 2  # 下
 
 -       # 通过计算获取
 
 -       self.y = Graphics.height-self.height
 
 -       @gold_window.y = 0
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 消息结束
 
 -   #--------------------------------------------------------------------------
 
 -   def terminate_message
 
 -     self.active = false
 
 -     self.pause = false
 
 -     self.index = -1
 
 -     @gold_window.close
 
 -     @number_input_window.active = false
 
 -     @number_input_window.visible = false
 
 -     $game_message.main_proc.call if $game_message.main_proc != nil
 
 -     $game_message.clear
 
 -     # 处理名称背景条和半身像
 
 -     @namebar_sprite.visible = false
 
 -     @face_sprite.visible = false
 
 -     @face_sprite.bitmap.clear
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 更新消息
 
 -   #--------------------------------------------------------------------------
 
 -   def update_message
 
 -     loop do
 
 -       c = @text.slice!(/./m)            # 获取下一条文字
 
 -       case c
 
 -       when nil                          # 没有可以显示的文字
 
 -         finish_message                  # 更新结束
 
 -         break
 
 -       when "\x00"                       # 换行
 
 -         new_line
 
 -         if @line_count >= MAX_LINE      # 行数为最大时
 
 -           unless @text.empty?           # 如果还有增加则继续
 
 -             self.pause = true           # 等待输入
 
 -             break
 
 -           end
 
 -         end
 
 -       when "\x01"                       # \C[n]  (更改文字色)
 
 -         @text.sub!(/\[([0-9]+)\]/, "")
 
 -         contents.font.color = text_color($1.to_i)
 
 -         next
 
 -       when "\x02"                       # \G  (显示所持金)
 
 -         @gold_window.refresh
 
 -         @gold_window.open
 
 -       when "\x03"                       # \.  (等待 1/4 秒)
 
 -         @wait_count = 15
 
 -         break
 
 -       when "\x04"                       # \|  (等待 1 秒)
 
 -         @wait_count = 60
 
 -         break
 
 -       when "\x05"                       # \!  (等待输入)
 
 -         self.pause = true
 
 -         break
 
 -       when "\x06"                       # \>  (瞬间显示 ON)
 
 -         @line_show_fast = true
 
 -       when "\x07"                       # \<  (瞬间显示 OFF)
 
 -         @line_show_fast = false
 
 -       when "\x08"                       # \^  (不等待输入)
 
 -         @pause_skip = true
 
 -       # 更改不透明度的情况下
 
 -       when "\x09"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         contents.font.color.alpha = $1.to_i
 
 -       # 显示技能情况下
 
 -       when "\x10"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         draw_icon($data_skills[$1.to_i].icon_index, @contents_x, @contents_y)
 
 -         # 纵坐标增加图标宽度
 
 -         @contents_x += 24
 
 -       # 显示物品情况下
 
 -       when "\x11"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         draw_icon($data_items[$1.to_i].icon_index, @contents_x, @contents_y)
 
 -         # 纵坐标增加图标宽度
 
 -         @contents_x += 24
 
 -       # 显示武器情况下
 
 -       when "\x12"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         draw_icon($data_weapons[$1.to_i].icon_index, @contents_x, @contents_y)
 
 -         # 纵坐标增加图标宽度
 
 -         @contents_x += 24
 
 -       # 显示防具情况下
 
 -       when "\x13"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         draw_icon($data_armors[$1.to_i].icon_index, @contents_x, @contents_y)
 
 -         # 纵坐标增加图标宽度
 
 -         @contents_x += 24
 
 -       # 更改字体的情况下
 
 -       when "\x14"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         contents.font.size = $1.to_i
 
 -       when "\x15"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         contents.font.name = FONT_ARRAY[$1.to_i]
 
 -       when "\x16"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         contents.font.color = text_color($1.to_i)
 
 -       # 自动关闭对话框的情况下
 
 -       when "\x17"
 
 -         @text.sub!(/\[(\d+)\]/, "")
 
 -         @auto_close = $1.to_i
 
 -       when "\x18"
 
 -         @auto_close = AUTO_CLOSE
 
 -       # 普通文字的情况下
 
 -       else
 
 -         font_height = contents.font.size + 2
 
 -         contents.draw_text(@contents_x, @contents_y, 40, font_height, c)
 
 -         c_width = contents.text_size(c).width
 
 -         @contents_x += c_width
 
 -       end
 
 -       break unless @show_fast or @line_show_fast
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 消息更新结束
 
 -   #--------------------------------------------------------------------------
 
 -   def finish_message
 
 -     if $game_message.choice_max > 0
 
 -       start_choice
 
 -     elsif $game_message.num_input_variable_id > 0
 
 -       start_number_input
 
 -     elsif @pause_skip
 
 -       terminate_message
 
 -     else
 
 -       self.pause = true
 
 -     end
 
 -     @wait_count = 10
 
 -     @text = nil
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 开始选择项
 
 -   #--------------------------------------------------------------------------
 
 -   def start_choice
 
 -     self.active = true
 
 -     self.index = 0
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 开始输入数值
 
 -   #--------------------------------------------------------------------------
 
 -   def start_number_input
 
 -     digits_max = $game_message.num_input_digits_max
 
 -     number = $game_variables[$game_message.num_input_variable_id]
 
 -     @number_input_window.digits_max = digits_max
 
 -     @number_input_window.number = number
 
 -     if $game_message.face_name.empty?
 
 -       @number_input_window.x = x
 
 -     else
 
 -       # 代入半身像宽度
 
 -       @number_input_window.x = x + @face_width
 
 -     end
 
 -     @number_input_window.y = y + @contents_y
 
 -     @number_input_window.active = true
 
 -     @number_input_window.visible = true
 
 -     @number_input_window.update
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ◎ 更新光标 #可能仍须增加判断
 
 -   #--------------------------------------------------------------------------
 
 -   def update_cursor
 
 -     if @index >= 0
 
 -       if $game_message.face_name.empty?
 
 -         x = 0
 
 -         y = ($game_message.choice_start+@index)*(MSG_FONT_SIZE+2)
 
 -         width = contents.width
 
 -       else
 
 -         x = @show_right ? 0 : @face_width
 
 -         y = ($game_message.choice_start+@index)*(MSG_FONT_SIZE+2) + NAME_Y_ADJ
 
 -         width = contents.width - @face_width
 
 -       end
 
 -       self.cursor_rect.set(x, y, width, (MSG_FONT_SIZE+2))
 
 -     else
 
 -       self.cursor_rect.empty
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 文章显示输入处理
 
 -   #--------------------------------------------------------------------------
 
 -   def input_pause
 
 -     if Input.trigger?(Input::B) or Input.trigger?(Input::C)
 
 -       self.pause = false
 
 -       if @text != nil and not @text.empty?
 
 -         new_page if @line_count >= MAX_LINE
 
 -       else
 
 -         terminate_message
 
 -       end
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 选择项输入处理
 
 -   #--------------------------------------------------------------------------
 
 -   def input_choice
 
 -     if Input.trigger?(Input::B)
 
 -       if $game_message.choice_cancel_type > 0
 
 -         Sound.play_cancel
 
 -         $game_message.choice_proc.call($game_message.choice_cancel_type - 1)
 
 -         terminate_message
 
 -       end
 
 -     elsif Input.trigger?(Input::C)
 
 -       Sound.play_decision
 
 -       $game_message.choice_proc.call(self.index)
 
 -       terminate_message
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 数值输入处理
 
 -   #--------------------------------------------------------------------------
 
 -   def input_number
 
 -     if Input.trigger?(Input::C)
 
 -       Sound.play_decision
 
 -       $game_variables[$game_message.num_input_variable_id] =
 
 -         @number_input_window.number
 
 -       $game_map.need_refresh = true
 
 -       terminate_message
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 生成名称背景条
 
 -   #--------------------------------------------------------------------------
 
 -   def create_namebar_sprite
 
 -     @namebar_sprite = Sprite.new
 
 -     @namebar_sprite.bitmap = Bitmap.new(Graphics.width-NAME_X_ADJ, NAME_FONT_SIZE+4)
 
 -     # 可视性
 
 -     @namebar_sprite.visible = false
 
 -     # 准备参数
 
 -     rect = Rect.new(NAME_X_ADJ, 0, @namebar_sprite.width, @namebar_sprite.height)
 
 -     color1 = text_color(NAME_BAR_COLOR)
 
 -     color2 = text_color(NAME_BAR_COLOR)
 
 -     color1.alpha = NAME_BAR_OPACITY
 
 -     color2.alpha = 0
 
 -     # 描绘渐变条
 
 -     @namebar_sprite.bitmap.gradient_fill_rect(rect, color1, color2)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 生成半身像
 
 -   #--------------------------------------------------------------------------
 
 -   def create_face_sprite
 
 -     @face_sprite = Sprite.new
 
 -     @face_sprite.bitmap = Bitmap.new(1,1)
 
 -     @face_sprite.z = self.z + 2
 
 -     @face_sprite.visible = false
 
 -     @old_name = ""                        # 判断头像是否改变
 
 -     @old_index = 0                        # 判断头像是否改变
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 显示名称背景条
 
 -   #--------------------------------------------------------------------------
 
 -   def show_namebar_sprite
 
 -     # 坐标跟随
 
 -     @namebar_sprite.x = self.x
 
 -     @namebar_sprite.y = self.y + 16 - 1
 
 -     @namebar_sprite.z = self.z + 1
 
 -     # 可视性
 
 -     @namebar_sprite.visible = true
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 描绘半身像
 
 -   #     face_name  : 半身像图像文件名
 
 -   #     face_index : 半身像图像索引
 
 -   #--------------------------------------------------------------------------
 
 -   def draw_msg_face(face_name, face_index)
 
 -     bitmap = Cache.face(face_name)
 
 -     width = bitmap.width / 4
 
 -     height = bitmap.height / 2
 
 -     rect = Rect.new(0, 0, 0, 0)
 
 -     rect.x = face_index % 4 * width
 
 -     rect.y = face_index / 4 * height
 
 -     rect.width = width
 
 -     rect.height = height
 
 -     @face_sprite.bitmap = Bitmap.new(width, height)
 
 -     @face_sprite.bitmap.blt(0, 0, bitmap, rect)
 
 -     @face_sprite.mirror = @show_right 
 
 -     bitmap.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 是否显示名称
 
 -   #--------------------------------------------------------------------------
 
 -   def show_name?
 
 -     return @namebar_sprite.visible
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 返回字体
 
 -   #     index       : 编号
 
 -   #--------------------------------------------------------------------------
 
 -   def get_font(index)
 
 -     case index
 
 -     when 0
 
 -       return Font.new(FONT_ARRAY[NAME_FONT_NAME], NAME_FONT_SIZE)
 
 -     when 1
 
 -       return Font.new(FONT_ARRAY[MSG_FONT_NAME], MSG_FONT_SIZE)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 获取半身像宽度
 
 -   #     face_name  : 半身像图像文件名
 
 -   #--------------------------------------------------------------------------
 
 -   def get_face_width(face_name)
 
 -     bitmap = Cache.face(face_name)
 
 -     @face_width = bitmap.width / 4
 
 -     bitmap.dispose
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ○ 设定半身像位置
 
 -   #--------------------------------------------------------------------------
 
 -   def set_face_pos
 
 -     @face_sprite.y = self.y + (self.height-@face_sprite.height) + FACE_Y_ADJ
 
 -     if @show_right
 
 -       @face_sprite.x = self.width - @face_sprite.width - FACE_X_ADJ
 
 -     else
 
 -       @face_sprite.x = self.x + FACE_X_ADJ
 
 -     end
 
 -     # 可视性
 
 -     @face_sprite.visible = true
 
 -   end
 
 - end
 
 
  复制代码 这个对话就行   \x[X]: 对话框将在X帧后自动关闭 
  系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~ |   
 
 
 
 |