设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1727|回复: 5
打印 上一主题 下一主题

[已经过期] fuki对话框脚本如何修改字体大小?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
455
在线时间
7 小时
注册时间
2014-1-9
帖子
4
跳转到指定楼层
1
发表于 2014-1-11 23:50:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 Chisato 于 2014-1-14 01:22 编辑

本人新手,对脚本不是很熟,用的是fuki脚本,脚本中的:

# 字体大小
MES_FONT_SIZE = 18    # 呼出对话框
NAME_FONT_SIZE = 20   # 角色名字窗口


1.我把24改成18了但是没有用,请问如何修改字体大小?

2.请问对话框中的文字显示区域(不是指对话框)的显示坐标要在哪里改?←就是说我对话框里面的文字第一行太靠下了,想往上调。


如果可以的话请告知一下相关脚本的行数,谢谢了。

使用的fuki脚本如下

RUBY 代码复制
  1. #============================================================================
  2. # 66加强对话框Fuki对话框整合+附送功能
  3. # By whbm
  4. #============================================================================
  5.  
  6. #   说明:
  7. #     这是一个整合了66加强对话框和Fuki对话框功能脚本,你可以靠改变开关来切换
  8. #     两个脚本。
  9.  
  10. #     附送功能:
  11. #     在对话中按enter键跳过打字效果
  12.  
  13. #   33号开关控制对话框的切换:
  14. #     打开--使用66加强对话框
  15. #     关闭--使用Fuki对话框
  16. #   34号开关控制附送功能的打开与关闭:
  17. #     打开--使用附送功能
  18. #     关闭--不使用附送功能
  19.  
  20. #============================================================================
  21. # 66加强对话框说明--66rpg
  22. #============================================================================
  23.  
  24. #默认为一个字一个字的方式,如果需要一次全部显示,
  25. #请在游戏中使用脚本:$game_system.typing = true
  26.  
  27. #默认对话字没有声音,如果需要声音,
  28. #请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
  29. #我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音
  30.  
  31. # 其他在对话中可以使用的功能:
  32.  
  33. # \n[1]:显示1号角色的姓名
  34.  
  35. # \name[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名
  36.  
  37. # \p[1]:对话框出现在1号事件的上方
  38. # \p[0]:主人公上方出现对话框
  39. #——————————————————使用\p功能后可以自动调整对话框大小
  40.  
  41. # \\:显示"\"这个符号
  42.  
  43. # \v[1] :显示变量1
  44.  
  45. # \v[a1] :显示防具1
  46.  
  47. # \v[w1] :显示武器1
  48.  
  49. # \v[i1] :显示物品1
  50.  
  51. # \v[s1] :显示特技1
  52.  
  53. # \c[1-8]:更改颜色
  54.  
  55. # \g:显示金钱窗口
  56.  
  57. # \a[SE文件名]:对话的时候播放SE
  58.  
  59. # \s[1-19]:更改弹字的速度
  60.  
  61. # \.   :停顿一刹那(1、2帧)
  62. # \|   :停顿片刻(20帧)
  63.  
  64. # \>   :文字不用打字方式
  65. # \<   :文字使用打字方式
  66.  
  67. # \!   :等待玩家按回车再继续
  68. # \~   :文字直接消失
  69.  
  70. # \I   :下一行从这个位置开始
  71.  
  72. # \o[123]:文字透明度改为123,模拟将死之人(汗)
  73.  
  74. # \h[12]:改用12号字
  75.  
  76. # \b[50]:空50象素
  77.  
  78. # \K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_speak设置的音效
  79.  
  80. # \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
  81. # \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”
  82.  
  83. # \Lk:清除左边的图像
  84. # \Rk:清除右边的图像
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92. #============================================================================
  93. # Fuki对话框说明--bbschat
  94. #============================================================================
  95. #
  96. #    呼出对话框 ver. 1.31 By パラ犬(日)
  97. #  来自 [url]http://rpg.para.s3p.net/[/url]
  98. #
  99. #  汉化修改 66RPG bbschat(2006.1.5)
  100. #    来自
  101. #
  102. #    ●准备工作-窗口Skin
  103. #
  104. #    首先,确认自己使用的对话框窗口Skin,(数据库-系统-窗口外观图形)
  105. #    然后根据该窗口Skin制作对话框尾部使用的两个箭头图形
  106. #    尾部箭头图形命名方式:“窗口skin名-top”,“窗口skin名-under”
  107. #    将该图形文件存放在“Graphics/Windowskins”文件夹下。
  108. #
  109. #    本演示游戏内置2套窗口和箭头图形,
  110. #    一套是游戏默认的“001-Blue01”,一套是定制的“fk”
  111. #    玩家可以根据自己的需要参照样本定制自己的呼出对话框窗口Skin。
  112. #
  113. #    ●呼出对话框使用方法
  114. #
  115. #    在事件命令行使用[脚本]将事件ID代入[$mes_id]
  116. #    该事件就可以使用呼出对话框了。
  117. #   (举例:$mes_id=4)
  118. #
  119. #    ID 代入 -1 表示玩家,代入 0 表示事件自身。
  120. #    代入 nil 或者 "" 则返回成通常的信息窗口。
  121. #    对话框的表示位置可以通过事件的“更改文章选项”来设定(上、中、下)。
  122. #    表示位置为“中央”的话,不管事件位置在哪里,对话框都将显示在画面中央。
  123. #
  124. #    ●角色名字窗口的使用文字的方法
  125. #
  126. #    在事件命令行使用[脚本]将文字列代入[$mes_name]
  127. #    对话框就会显示角色名字窗口
  128. #   (举例:$mes_name="阿尔西斯")
  129. #    代入 nil 或者 "" 则不显示角色名字窗口。
  130. #
  131. #    以上两个机能是独立的,所以可以单独使用
  132. #
  133. #   $mes_id=(ID) + $mes_name="名字"  :呼出对话框显示 + 角色名字窗口
  134. #   $mes_id=(ID) + $mes_name=""      :呼出对话框显示(没有角色名字)
  135. #   $mes_id=nil  + $mes_name="名字"  :默认信息窗口 + 角色名字窗口
  136. #   $mes_id=nil  + $mes_name=""      :默认信息窗口(没有角色名字)
  137. #
  138. #    ●角色名字窗口使用角色图片的方法(汉化特别追加功能,原脚本只能使用文字)
  139. #   
  140. #    如果能在对应文件夹中找到文件名和角色名字相同的图片,   
  141. #    则角色名字窗口显示角色头像图片,角色图片最好能包括角色的名字。
  142. #    默认头像图片保存目录为“Graphics/Heads/”,玩家可自行修改。
  143. #
  144. #    如果不想使用角色名字直接作为头像文件名。
  145. #    可以使用下面在 Game_Temp 类里增加的namebmp属性。
  146. #    重新设定角色名字与文件名的对应关系。
  147. #
  148. #    ●信息表示速度的变更方法
  149. #
  150. #    在事件命令行使用[脚本]将数值代入[$mes_speed]
  151. #    速度为 0 即瞬间显示全部信息,数字越大,信息表示速度越慢。
  152. #   (举例:$mes_speed=1)
  153. #
  154. #    ●其他设置
  155. #
  156. #    请参照下面的注释
  157. #
  158. #    补一句,用脚本chat(id,"名字")就相当于$mes_id=ID;$mes_name="名字"
  159. #==============================================================================
  160.  
  161. module FUKI
  162.  
  163. # 头像图片保存目录的设定
  164. HEAD_PIC_DIR = "Graphics/Heads/"
  165.  
  166. # 是否显示尾部图标
  167. TAIL_SHOW = true
  168.  
  169. # Skin的设定
  170. # 使用数据库默认窗口Skin情况下这里使用[""]
  171. FUKI_SKIN_NAME = "fk"   # 呼出对话框用Skin
  172. NAME_SKIN_NAME = "fk"   # 角色名字窗口用Skin
  173.  
  174. # 字体大小
  175. MES_FONT_SIZE=18    # 呼出对话框
  176. NAME_FONT_SIZE=18   # 角色名字窗口
  177.  
  178. # 字体颜色
  179. #(设定为 Color.new(0, 0, 0, 0) 表示使用普通文字色)
  180. FUKI_COLOR = Color.new(255, 255, 255, 255)  # 呼出对话框
  181. NAME_COLOR = Color.new(255, 255, 255, 255)  # 角色名字窗口
  182.  
  183. # 窗口透明度
  184. # 如修改窗口透明度请同时修改尾部箭头图形内部的透明度
  185. FUKI_OPACITY = 160    # 呼出对话框
  186. MES_OPACITY = 255     # 默认信息窗口
  187. NAME_OPACITY = 255    # 角色名字窗口
  188.  
  189. # 角色名字窗口的相对位置
  190. NAME_SHIFT_X = 0      # 横坐标
  191. NAME_SHIFT_Y = 16     # 纵坐标
  192.  
  193. # 窗口表示时是否根据画面大小自动检查窗口出现的位置,
  194. # 自动改变位置( true / false )
  195. # 设置成 true 可能出现箭头图标颠倒的问题 <- bbschat
  196. POS_FIX = false
  197.  
  198. # 在画面最边缘表示时的稍微挪动
  199. # 使用圆形Skin的角和方框的角重合的情况下为 true
  200. CORNER_SHIFT = false
  201. SHIFT_PIXEL = 4   # true 时挪动的象素
  202.  
  203. # 角色高度尺寸
  204. CHARACTOR_HEIGHT = 48
  205. # 呼出对话框的相对位置(纵坐标)
  206. POP_SHIFT_TOP = 0         # 表示位置为上的时候
  207. POP_SHIFT_UNDER = 0       # 表示位置为下的时候
  208.  
  209. # 信息的表示速度(数字越小速度越快,0为瞬间表示)
  210. # 游戏中 可随时用数字代入 $mes_speed 来改变消息表示速度。
  211. MES_SPEED = 1
  212.  
  213. end
  214.  
  215. #==============================================================================
  216. # 方便用户同时设置2个常用参数而使用的函数
  217. #==============================================================================
  218. def chat(id = 0,name = "")
  219. $mes_id = id
  220. $mes_name = name
  221. end
  222.  
  223. #==============================================================================
  224. # □ Game_Temp
  225. #==============================================================================
  226.  
  227. class Game_Temp
  228. attr_accessor  :namebmp              #保存头像图片的Hash表
  229. alias initialize_fuki initialize
  230. def initialize
  231.   initialize_fuki
  232.   # 如果不想使用角色名字直接作为头像文件名
  233.   # 可在这里重新设定角色名字与文件名的对应关系
  234.   @namebmp ={"莉德露"=>"001-Player-Face",
  235.   }
  236. end
  237. end
  238. #==============================================================================
  239. # □ Game_System
  240. #==============================================================================
  241. class Game_System
  242. attr_accessor :typing
  243. attr_accessor :soundname_on_speak
  244. alias carol3_ini initialize
  245. def initialize
  246.   carol3_ini
  247.   @typing = true
  248.   @soundname_on_speak = nil
  249. end
  250. end
  251. #==============================================================================
  252. # □ Window_FukiMessage
  253. #==============================================================================
  254.  
  255. class Window_FukiMessage < Window_Selectable
  256.  
  257. #--------------------------------------------------------------------------
  258. # ● 初始化状态
  259. #--------------------------------------------------------------------------
  260. def initialize
  261.   super(32, 320, 580, 120)
  262.   self.contents = Bitmap.new(width - 32, height - 32)
  263.   self.visible = false
  264.   self.z = 9998
  265.   @fade_in = false
  266.   @fade_out = false
  267.   @contents_showing = false
  268.   @cursor_width = 0
  269.   self.active = false
  270.   self.index = -1
  271.   #........................................................................
  272.   if $game_system.soundname_on_speak == nil then
  273.     $game_system.soundname_on_speak = ""
  274.   end
  275.   @opacity_text_buf = Bitmap.new(32, 32)
  276.   #........................................................................
  277.   @w = 0
  278.   @h = 0
  279.   @wait = 0
  280.   @dx = 0
  281.   @dy = 0
  282.   $mes_speed = FUKI::MES_SPEED
  283. end
  284.  
  285. #--------------------------------------------------------------------------
  286. # ○ 决定窗口尺寸并生成窗口
  287. #--------------------------------------------------------------------------
  288. def refresh_create
  289.   self.contents.clear
  290.   self.contents.font.color = normal_color
  291.   self.contents.font.size = FUKI::MES_FONT_SIZE
  292.   # 取得窗口尺寸
  293.   get_windowsize
  294.   w = @w + 32 + 8
  295.   h = @h * (self.contents.font.size + 10) + 26
  296.   # 生成呼出窗口
  297.   set_fukidasi(self.x, self.y, w, h)
  298.   # 生成角色名字窗口
  299.   set_namewindow
  300.   # 初始化信息表示使用的变量
  301.   @dx = @dy = 0
  302.   @cursor_width = 0
  303.   @contents_drawing = true
  304.   # 瞬间表示的情况下
  305.   if $mes_speed == 0
  306.     # 循环信息描绘处理
  307.     while $game_temp.message_text != ""
  308.       draw_massage
  309.     end
  310.     draw_opt_text
  311.     @contents_showing_end = true
  312.     @contents_drawing = false
  313.   else
  314.     # 一个一个描绘文字
  315.     refresh_drawtext
  316.   end
  317. end
  318.  
  319. #--------------------------------------------------------------------------
  320. # ○ 一个一个描绘文字
  321. #--------------------------------------------------------------------------
  322. def refresh_drawtext
  323.   #........................................................................
  324.   if Input.trigger?(Input::C) and $game_switches[34]
  325.     # 循环信息描绘处理
  326.     while $game_temp.message_text != ""
  327.       draw_massage
  328.     end
  329.     draw_opt_text
  330.     @contents_showing_end = true
  331.     @contents_drawing = false
  332.   end
  333.   #........................................................................
  334.   if $game_temp.message_text != nil
  335.     if @wait > 0
  336.       @wait -= 1
  337.     elsif @wait == 0
  338.       # 描绘处理
  339.       draw_massage
  340.       #追加音效
  341.     #  Audio.se_play("Audio/SE/系统-光标.wav",70,100)
  342.       @wait = $mes_speed
  343.     end
  344.   end
  345.   # 描绘结束
  346.   if $game_temp.message_text == ""
  347.     draw_opt_text
  348.     @contents_showing_end = true
  349.     @contents_drawing = false
  350.   end
  351. end
  352.  
  353. #--------------------------------------------------------------------------
  354. # ○ 66rpg-refresh
  355. #--------------------------------------------------------------------------
  356. def refresh
  357.    # 初期化
  358.    self.contents.clear
  359.    self.contents.font.color = normal_color
  360.    self.contents.font.size = Font.default_size
  361.    @x = @y = @max_x = @max_y = @indent = @lines = 0
  362.    @left_keep = @right_keep = false
  363.    @face_indent = 0
  364.    @opacity = 255
  365.    @cursor_width = 0
  366.    @write_speed = 0
  367.    @write_wait = 0
  368.    @mid_stop = false
  369.    @face_file = nil
  370.    @popchar = -2
  371.    if $game_temp.choice_start == 0
  372.      @x = 8
  373.    end
  374.    if $game_temp.message_text != nil
  375.      @now_text = $game_temp.message_text
  376.      #——头像设置
  377.      if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
  378.        @face_file = $1 + ".png"
  379.        @x = @face_indent = 128
  380.        if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
  381.          self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  382.        end
  383.        @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  384.      end
  385.      #——左半身像设置
  386.      if (/\\[Ll]\[(.+?)\]/.match(@now_text))!=nil then
  387.        @face = "66rpg_" + $1 + "_h.png"
  388.        if $加密 == true
  389.          if @left_picture != nil
  390.            @left_picture.dispose
  391.          end
  392.          @left_picture = Sprite.new
  393.          @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  394.          @left_picture.y = [email]480-@left_picture.bitmap.height[/email]
  395.          @left_picture.x = 0
  396.          @left_picture.mirror = true
  397.          @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  398.        else         
  399.          if FileTest.exist?("Graphics/battlers/#{@face}")
  400.            if @left_picture != nil
  401.              @left_picture.dispose
  402.            end
  403.            @left_picture = Sprite.new
  404.            @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  405.            @left_picture.y = [email]480-@left_picture.bitmap.height[/email]
  406.            @left_picture.x = 0
  407.            @left_picture.mirror = true
  408.            @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  409.          end
  410.        end        
  411.      end
  412.      #——右半身像设置
  413.      if (/\\[Rr]\[(.+?)\]/.match(@now_text))!=nil then
  414.        @face = "66rpg_" + $1 + "_h.png"
  415.        if $加密 == true
  416.          if @right_picture != nil
  417.            @right_picture.dispose
  418.          end
  419.          @right_picture = Sprite.new
  420.          @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  421.          @right_picture.y = [email]480-@right_picture.bitmap.height[/email]
  422.          @right_picture.x = [email]640-@right_picture.bitmap.width[/email]
  423.          @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  424.        else
  425.          if FileTest.exist?("Graphics/battlers/#{@face}")
  426.            if @right_picture != nil
  427.              @right_picture.dispose
  428.            end
  429.            @right_picture = Sprite.new
  430.            @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  431.            @right_picture.y = [email]480-@right_picture.bitmap.height[/email]
  432.            @right_picture.x = [email]640-@right_picture.bitmap.width[/email]
  433.            @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  434.          end
  435.        end
  436.      end
  437.      if (/\\[Rr]k/.match(@now_text)) != nil
  438.        @right_keep = true
  439.        @now_text.sub!(/\\[Rr]k/) { "" }
  440.      end
  441.      if (/\\[Ll]k/.match(@now_text)) != nil
  442.        @left_keep = true
  443.        @now_text.sub!(/\\[Ll]k/) { "" }
  444.      end
  445.      # 显示人物姓名
  446.      name_window_set = false
  447.      if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
  448.        name_window_set = true
  449.        name_text = $1
  450.        @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  451.      end
  452.  
  453.      # 文字位置的判定
  454.      if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
  455.        @popchar = $1.to_i
  456.        if @popchar == -1
  457.          @x = @indent = 48
  458.          @y = 4
  459.        end
  460.        @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  461.      end
  462.  
  463.      # 开始
  464.      begin
  465.        last_text = @now_text.clone
  466.        @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  467.      end until @now_text == last_text
  468.      @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  469.      $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  470.    end
  471.    @now_text.gsub!(/\\\\/) { "\000" }
  472.    @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  473.    @now_text.gsub!(/\\[Gg]/) { "\002" }
  474.    @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  475.    @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  476.    @now_text.gsub!(/\\[.]/) { "\005" }
  477.    @now_text.gsub!(/\\[|]/) { "\006" }
  478.  
  479.    @now_text.gsub!(/\\[>]/) { "\016" }
  480.    @now_text.gsub!(/\\[<]/) { "\017" }
  481.    @now_text.gsub!(/\\[!]/) { "\020" }
  482.    @now_text.gsub!(/\\[~]/) { "\021" }
  483.  
  484.    @now_text.gsub!(/\\[Ii]/) { "\023" }
  485.    @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  486.    @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  487.    @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  488.    @now_text.gsub!(/\\[Kk]\[(.*?)\]/) { "\027[#{$1}]" }
  489.    if @popchar >= 0
  490.      @text_save = @now_text.clone
  491.      @max_x = 0
  492.      @max_y = 4
  493.      for i in 0..3
  494.        line = @now_text.split(/\n/)[3-i]
  495.        @max_y -= 1 if line == nil and @max_y <= 4-i
  496.        next if line == nil
  497.        cx = contents.text_size(line).width
  498.        @max_x = cx if cx > @max_x
  499.      end
  500.      self.width = @max_x + 48 + @face_indent
  501.      self.height = (@max_y - 1) * 32 + 64
  502.    else
  503.      @max_x = self.width - 32 - @face_indent
  504.    end
  505.    reset_window
  506.      if name_window_set
  507.        off_x = 0
  508.        off_y = -40
  509.        space = 2
  510.        x = self.x + off_x - space / 2
  511.        y = self.y + off_y - space / 2
  512.        w = self.contents.text_size(name_text).width + 26 + space
  513.        h = 40 + space
  514.        @name_window_frame = Window_Frame.new(x, y, w, h)
  515.        @name_window_frame.z = self.z + 1
  516.        x = self.x + off_x + 4
  517.        y = self.y + off_y
  518.        @name_window_text = Air_Text.new(x+4, y+6, name_text)
  519.        @name_window_text.z = self.z + 2
  520.      end
  521.    end
  522.    reset_window
  523.    if $game_temp.choice_max > 0
  524.      @item_max = $game_temp.choice_max
  525.      self.active = true
  526.      self.index = 0
  527.    end
  528.    if $game_temp.num_input_variable_id > 0
  529.      digits_max = $game_temp.num_input_digits_max
  530.      number = $game_variables[$game_temp.num_input_variable_id]
  531.      @input_number_window = Window_InputNumber.new(digits_max)
  532.      @input_number_window.number = number
  533.      @input_number_window.x = self.x + 8
  534.      @input_number_window.y = self.y + $game_temp.num_input_start * 32
  535.    end
  536. end
  537.  
  538.  
  539.  
  540. #==============================================================================
  541. # ■ Window_Frame (枠だけで中身の無いウィンドウ)
  542. #==============================================================================
  543. class Window_Frame < Window_Base
  544. #--------------------------------------------------------------------------
  545. # ● オブジェクト初期化
  546. #--------------------------------------------------------------------------
  547. def initialize(x, y, width, height)
  548.   super(x, y, width, height)
  549.   self.contents = nil
  550.   self.back_opacity = 100
  551. end
  552. #--------------------------------------------------------------------------
  553. # ● 解放
  554. #--------------------------------------------------------------------------
  555. def dispose
  556.   super
  557. end
  558. end
  559.  
  560. #==============================================================================
  561. # ■ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  562. #==============================================================================
  563. class Air_Text < Window_Base
  564. #--------------------------------------------------------------------------
  565. # ● オブジェクト初期化
  566. #--------------------------------------------------------------------------
  567. def initialize(x, y, designate_text)
  568.    super(x-16, y-16, 32 + designate_text.size * 12, 56)
  569.    self.opacity = 0
  570.    self.back_opacity = 0
  571.    self.contents = Bitmap.new(self.width - 32, self.height - 32)
  572.    w = self.contents.width
  573.    h = self.contents.height
  574.    self.contents.draw_text(0, 0, w, h, designate_text)
  575. end
  576. #--------------------------------------------------------------------------
  577. # ● 解放
  578. #--------------------------------------------------------------------------
  579. def dispose
  580.    self.contents.clear
  581.    super
  582. end
  583. end
  584.  
  585.  
  586. #--------------------------------------------------------------------------
  587. # ○ 取得窗口尺寸
  588. #--------------------------------------------------------------------------
  589. def get_windowsize
  590.   x = y = 0
  591.   @h = @w = 0
  592.   @cursor_width = 0
  593.   # 有选择项的话,处理字的缩进
  594.   if $game_temp.choice_start == 0
  595.     x = 16
  596.   end
  597.   # 有等待显示的文字的情况下
  598.   if $game_temp.message_text != nil
  599.   text = $game_temp.message_text.clone
  600.     # 限制文字处理
  601.     begin
  602.       last_text = text.clone
  603.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  604.     end until text == last_text
  605.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  606.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  607.     end
  608.     # 为了方便、将 "\\\\" 变换为 "\000"
  609.     text.gsub!(/\\\\/) { "\000" }
  610.     # "\\C" 变为 "\001" 、"\\G" 变为 "\002"
  611.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001" }
  612.     text.gsub!(/\\[Gg]/) { "\002" }
  613.     # c 获取 1 个字 (如果不能取得文字就循环)
  614.     while ((c = text.slice!(/./m)) != nil)
  615.       # \\ 的情况下
  616.       if c == "\000"
  617.         # 还原为本来的文字
  618.         c = "\\"
  619.       end
  620.       # \C[n] 或者 \G 的情况下
  621.       if c == "\001" or c == "\002"
  622.         # 下面的文字
  623.         next
  624.       end
  625.       # 另起一行文字的情况下
  626.       if c == "\n"
  627.         # y 累加 1
  628.         y += 1
  629.         # 取得纵横尺寸
  630.         @h = y
  631.         @w = x > @w ? x : @w
  632.         if y >= $game_temp.choice_start
  633.           @w = x + 8 > @w ? x + 8 : @w
  634.         end
  635.         x = 0
  636.         # 移动到选择项的下一行
  637.         if y >= $game_temp.choice_start
  638.           x = 8
  639.         end
  640.         # 下面的文字
  641.         next
  642.       end
  643.       # x 为要描绘文字的宽度加法运算
  644.       x += self.contents.text_size(c).width
  645.     end
  646.   end
  647.   # 输入数值的情况
  648.   if $game_temp.num_input_variable_id > 0
  649.     digits_max = $game_temp.num_input_digits_max
  650.     number = $game_variables[$game_temp.num_input_variable_id]
  651.     @h += 1
  652.     x = digits_max * self.contents.font.size + 16
  653.     @w = x > @w ? x : @w
  654.   end
  655. end
  656.  
  657. #--------------------------------------------------------------------------
  658. # ○ 描绘信息处理
  659. #--------------------------------------------------------------------------
  660. def draw_massage
  661.   # 有等待显示的文字的情况下
  662.   if $game_temp.message_text != nil
  663.     text = $game_temp.message_text
  664.     # 限制文字处理
  665.     begin
  666.       last_text = text.clone
  667.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  668.     end until text == last_text
  669.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  670.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  671.     end
  672.     # 为了方便、将 "\\\\" 变换为 "\000"
  673.     text.gsub!(/\\\\/) { "\000" }
  674.     # "\\C" 变为 "\001"、"\\G" 变为 "\002"
  675.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  676.     text.gsub!(/\\[Gg]/) { "\002" }
  677.     # c 获取 1 个字
  678.     if ((c = text.slice!(/./m)) != nil)
  679.       # 选择项的情况
  680.       if @dy >= $game_temp.choice_start
  681.         # 处理字的缩进
  682.         @dx = 8
  683.         # 描绘文字
  684.         self.contents.draw_text(4 + @dx, 32 * @dy, 40, 32, c)
  685.         # x 为要描绘文字宽度的加法运算
  686.         @dx += self.contents.text_size(c).width
  687.         # 循环
  688.         while ((c = text.slice!(/./m)) != "\n")
  689.           # 描绘文字
  690.           self.contents.draw_text(4 + @dx, 32 * @dy, 40, 32, c)
  691.           # x 为要描绘文字宽度的加法运算
  692.           @dx += self.contents.text_size(c).width
  693.         end
  694.         if c == "\n"
  695.           # 更新光标宽度
  696.           @cursor_width = [@cursor_width, @dx].max
  697.           # dy 累加 1
  698.           @dy += 1
  699.           @dx = 0
  700.         end
  701.         return
  702.       end
  703.       # \\ 的情况下
  704.       if c == "\000"
  705.         # 还原为本来的文字
  706.         c = "\\"
  707.       end
  708.       #\C[n] 的情况下
  709.       if c == "\001"
  710.         # 更改文字色
  711.         text.sub!(/\[([0-9]+)\]/, "")
  712.         color = $1.to_i
  713.         if color >= 0 and color <= 7
  714.           self.contents.font.color = text_color(color)
  715.         end
  716.       end
  717.       # \G 的情况下
  718.       if c == "\002"
  719.         # 生成金钱窗口
  720.         if @gold_window == nil
  721.           @gold_window = Window_Gold.new
  722.           @gold_window.x = 560 - @gold_window.width
  723.           if $game_temp.in_battle
  724.             @gold_window.y = 192
  725.           else
  726.             @gold_window.y = self.y >= 128 ? 32 : 384
  727.           end
  728.           @gold_window.opacity = self.opacity
  729.           @gold_window.back_opacity = self.back_opacity
  730.         end
  731.       end
  732.       # 另起一行文字的情况下
  733.       if c == "\n"
  734.         # dy 累加 1
  735.         @dy += 1
  736.         @dx = 0
  737.       end
  738.       # 描绘文字
  739.       self.contents.font.size = FUKI::MES_FONT_SIZE
  740.       font_size = self.contents.font.size
  741.       #self.contents.draw_text(4+@dx, (font_size+10)*@dy, font_size, font_size, c)
  742.       if c == "\001" or c == "\002" or c == "\003" or c == "\n"
  743.          c = ""
  744.        else
  745.          self.contents.draw_text(4+@dx, (font_size+10)*@dy, font_size, font_size, c)
  746.        end
  747.       # dx 为要描绘文字的宽度加法运算
  748.       @dx += self.contents.text_size(c).width
  749.     end
  750.   end
  751. end
  752.  
  753. #--------------------------------------------------------------------------
  754. # ○ 选择项和输入数值的情况下
  755. #--------------------------------------------------------------------------
  756. def draw_opt_text
  757.   # 选择项的情况下
  758.   if $game_temp.choice_max > 0
  759.     @item_max = $game_temp.choice_max
  760.     self.active = true
  761.     self.index = 0
  762.   end
  763.   # 输入数值的情况下
  764.   if $game_temp.num_input_variable_id > 0
  765.     digits_max = $game_temp.num_input_digits_max
  766.     number = $game_variables[$game_temp.num_input_variable_id]
  767.     @input_number_window = Window_InputNumber.new(digits_max)
  768.     @input_number_window.number = number
  769.     @input_number_window.x = self.x + 8
  770.     @input_number_window.y = self.y + $game_temp.num_input_start * 32
  771.   end
  772. end
  773.  
  774. #--------------------------------------------------------------------------
  775. # ○ 设置呼出对话框
  776. #--------------------------------------------------------------------------
  777. def set_fukidasi(x, y, width, height)
  778.   # $mes_id 为空的时候,不显示呼出对话框
  779.   if $mes_id == nil or $mes_id == ""
  780.     del_fukidasi
  781.     reset_window
  782.   else
  783.     # 不显示暂停标志
  784.     self.pause = false
  785.     # 取得对话框位置
  786.     pos = get_fuki_pos(width, height)
  787.     x = pos[0]
  788.     y = pos[1]
  789.     skin = FUKI::FUKI_SKIN_NAME != "" ? FUKI::FUKI_SKIN_NAME : $game_system.windowskin_name
  790.     # 生成呼出对话框
  791.     self.windowskin = RPG::Cache.windowskin(skin)
  792.     self.x = x
  793.     self.y = y
  794.     self.height = height
  795.     self.width = width
  796.     self.contents.dispose
  797.     self.contents = Bitmap.new(width - 32, height - 32)
  798.     self.back_opacity = FUKI::FUKI_OPACITY
  799.     self.contents.clear
  800.     self.contents.font.color = normal_color
  801.     self.contents.font.size = FUKI::MES_FONT_SIZE
  802.     # 描绘尾部图标
  803.     if $game_system.message_frame == 0
  804.       # 取得位置
  805.       tale_pos = get_tale_pos
  806.       @tale = Sprite.new
  807.       # 是否显示尾部图标 <- bbschat
  808.       if FUKI::TAIL_SHOW == true
  809.         case @message_position
  810.           when 0  # 上
  811.             @tale.bitmap = RPG::Cache.windowskin(skin + "-top")
  812.             @tale.x = tale_pos[0]
  813.             @tale.y = tale_pos[1]
  814.             @tale.z = self.z + 1
  815.           when 1  # 中
  816.             @tale.dispose
  817.             @tale = nil
  818.           when 2  # 下
  819.             @tale.bitmap = RPG::Cache.windowskin(skin + "-under")
  820.             @tale.x = tale_pos[0]
  821.             @tale.y = tale_pos[1]
  822.             @tale.z = self.z + 1
  823.         end
  824.       end
  825.     end
  826.   end
  827. end
  828.  
  829. #--------------------------------------------------------------------------
  830. # ○ 计算呼出对话框的位置
  831. #--------------------------------------------------------------------------
  832. def get_fuki_pos(width, height)
  833.  
  834.   # 取得角色
  835.   @character = get_character($mes_id)
  836.   if @character == nil
  837.     # 角色不存在的情况下使用默认信息框
  838.     del_fukidasi
  839.     reset_window
  840.     return
  841.   end
  842.   # 处理坐标
  843.   x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - (width / 2)
  844.   # 为尽量显示在画面内而移动横坐标
  845.   if x + width > 640
  846.     x = 640 - width
  847.   elsif x < 0
  848.     x = 0
  849.   end
  850.   # 决定窗口位置
  851.   case $game_system.message_position
  852.     when 0  # 上
  853.       y = (@character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
  854.     when 1  # 中
  855.       y = (480 - height) / 2
  856.       x = (640 - width) / 2
  857.     when 2  # 下
  858.       y =  (@character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
  859.   end
  860.   # 纪录文章显示位置
  861.   @message_position = $game_system.message_position
  862.   # 如果选择自动修正,则如果文章会显示到画面外则自动改变窗口的尺寸(高度)
  863.   if FUKI::POS_FIX
  864.     case @message_position
  865.       when 0  # 上
  866.         if y <= 0
  867.           @message_position = 2
  868.           y =  (@character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
  869.         end
  870.       when 2  # 下
  871.         if y + height >= 480
  872.           p "上"
  873.           @message_position = 0
  874.           y = (@character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
  875.         end
  876.     end
  877.   end
  878.   return [x,y]
  879.  
  880. end
  881.  
  882. #--------------------------------------------------------------------------
  883. # ○ 计算尾部图标的位置
  884. #--------------------------------------------------------------------------
  885. def get_tale_pos
  886.   case @message_position
  887.     when 0  # 上
  888.       # 处理坐标
  889.       x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
  890.       # 画面边缘的话则移动位置
  891.       if FUKI::CORNER_SHIFT
  892.         if x == 0
  893.           x = FUKI::SHIFT_PIXEL
  894.         elsif x == 640 - 32
  895.           x = 640 - 32 - FUKI::SHIFT_PIXEL
  896.         end
  897.       end
  898.       y = self.y + self.height - 16
  899.     when 1  # 中
  900.       x = nil
  901.       y = nil
  902.     when 2  # 下
  903.       # 处理坐标
  904.       x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
  905.       # 画面边缘的话则移动位置
  906.       if FUKI::CORNER_SHIFT
  907.         if x == 0
  908.           x = FUKI::SHIFT_PIXEL
  909.         elsif @tale.x == 640 - 32
  910.           x = 640 - 32 - FUKI::SHIFT_PIXEL
  911.         end
  912.       end
  913.       y = self.y - 16
  914.   end
  915.   return [x,y]
  916. end
  917.  
  918. #--------------------------------------------------------------------------
  919. # ○ 计算名字窗口的位置
  920. #--------------------------------------------------------------------------
  921. def get_name_pos
  922.   case @face_pic_txt
  923.     when 0  # 文字
  924.       x = self.x + FUKI::NAME_SHIFT_X
  925.       y = self.y - FUKI::NAME_FONT_SIZE - 16 + FUKI::NAME_SHIFT_Y
  926.     when 1  # 图片
  927.       if self.x >= @pic_width + 5
  928.         # 默认头像显示在对话框左边
  929.         x = self.x-@pic_width-5
  930.       else
  931.         # 对话框左边放不下时头像显示在右边
  932.         x = self.x + self.width
  933.       end
  934.       y = self.y+self.height/2 - (@pic_height + 5)/2
  935.     end
  936.  
  937.   return [x,y]
  938. end
  939. #--------------------------------------------------------------------------
  940. # ○ 设置角色名字窗口
  941. #--------------------------------------------------------------------------
  942. def set_namewindow
  943.  
  944.   # $mes_name为空时不显示角色名字窗口
  945.   if $mes_name == nil or $mes_name == ""
  946.     return
  947.   else
  948.     # 设定变量
  949.     mes_name = $mes_name
  950.     skin = FUKI::NAME_SKIN_NAME != "" ? FUKI::NAME_SKIN_NAME : $game_system.windowskin_name
  951.  
  952.     #判断名称是否有对应的图片"Graphics/heads/" +
  953.     if $game_temp.namebmp[mes_name] == nil then
  954.       sFile = "Graphics/heads/" + mes_name + ".png"
  955.     else
  956.       sFile = "Graphics/heads/" + $game_temp.namebmp[mes_name] + ".png"
  957.     end
  958.  
  959.     if FileTest.exist?(sFile) == true then
  960.  
  961.       @face_pic_txt = 1                       #名字窗口使用头像<- bbschat
  962.  
  963.       # 生成头像
  964.       bmp = Bitmap.new(sFile)
  965.       @pic_width = bmp.width
  966.       @pic_height = bmp.height
  967.  
  968.       if self.x >= @pic_width + 5
  969.         # 默认头像显示在对话框左边
  970.         name_x = self.x-@pic_width-5
  971.       else
  972.         # 对话框左边放不下时头像显示在右边
  973.         name_x = self.x + self.width
  974.       end
  975.       name_y = self.y+self.height/2 - (@pic_height + 5)/2
  976.  
  977.       # 生成角色头像窗口
  978.       @name_win = Window_Base.new(name_x, name_y, @pic_width + 5, @pic_height + 5)
  979.       @name_win.windowskin = RPG::Cache.windowskin(skin)
  980.       @name_win.back_opacity =0     
  981.       @name_win.z = self.z + 1
  982.  
  983.       @name_contents = Sprite.new
  984.       @name_contents.x = name_x + 2
  985.       @name_contents.y = name_y + 2
  986.       @name_contents.bitmap = bmp
  987.       #@name_contents.z = @name_win.z + 2     #这个用了似乎效果不好<- bbschat
  988.  
  989.     else
  990.  
  991.       @face_pic_txt = 0                       #名字窗口使用文字<- bbschat
  992.  
  993.       # 生成名字
  994.       name_width = mes_name.size / 2 * FUKI::NAME_FONT_SIZE
  995.       name_height = FUKI::NAME_FONT_SIZE
  996.       name_x = self.x + FUKI::NAME_SHIFT_X
  997.       name_y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y
  998.  
  999.       # 生成角色名字窗口(只有边框)
  1000.       @name_win = Window_Base.new(name_x, name_y, name_width + 16, name_height + 16)
  1001.       @name_win.windowskin = RPG::Cache.windowskin(skin)
  1002.       @name_win.back_opacity = FUKI::NAME_OPACITY
  1003.       @name_win.z = self.z + 1
  1004.  
  1005.       # 为了使空白比Windows类限定的更小使用双重结构
  1006.       @name_contents = Sprite.new
  1007.       @name_contents.x = name_x + 12
  1008.       @name_contents.y = name_y + 8
  1009.       @name_contents.bitmap = Bitmap.new(name_width, name_height)
  1010.       @name_contents.z = @name_win.z + 2
  1011.  
  1012.       # 设定文字色
  1013.       nil_color = Color.new(0,0,0,0)
  1014.       if FUKI::NAME_COLOR != nil_color
  1015.         @name_contents.bitmap.font.color = FUKI::NAME_COLOR
  1016.       else
  1017.         @name_contents.bitmap.font.color = normal_color
  1018.       end
  1019.       @name_contents.bitmap.font.size = FUKI::NAME_FONT_SIZE
  1020.       # 调整窗口尺寸
  1021.       rect = @name_contents.bitmap.text_size(mes_name)
  1022.       @name_win.width = rect.width + 32
  1023.       # 描画名字
  1024.       @name_contents.bitmap.draw_text(rect, mes_name)
  1025.     end
  1026.   end
  1027.  
  1028. end
  1029.  
  1030. #--------------------------------------------------------------------------
  1031. # ○ 释放呼出对话框和角色名字窗口
  1032. #--------------------------------------------------------------------------
  1033. def del_fukidasi
  1034.   if @tale != nil
  1035.     @tale.dispose
  1036.     @tale = nil
  1037.   end
  1038.   if @name_win != nil
  1039.     @name_win.dispose
  1040.     @name_win = nil
  1041.     @name_contents.dispose
  1042.     @name_contents = nil
  1043.   end
  1044.   self.opacity = 0
  1045.   self.x = 80
  1046.   self.width = 480
  1047.   self.height = 160
  1048.   self.contents.dispose
  1049.   self.contents = Bitmap.new(width - 32, height - 32)
  1050.   self.pause = true
  1051. end
  1052.  
  1053. #--------------------------------------------------------------------------
  1054. # ○ 取得角色
  1055. #     parameter : 参数
  1056. #--------------------------------------------------------------------------
  1057. def get_character(parameter)
  1058. if $game_switches[33]
  1059.   #........................................................................
  1060.   case parameter
  1061.   when 0
  1062.     return $game_player
  1063.   else
  1064.     events = $game_map.events
  1065.     return events == nil ? nil : events[parameter]
  1066.   end
  1067.   #........................................................................
  1068. else
  1069.   # 参数分歧
  1070.   case parameter
  1071.   when -1  # 玩家
  1072.     return $game_player
  1073.   when 0   # 该事件
  1074.     events = $game_map.events
  1075.     return events == nil ? nil : events[$active_event_id]
  1076.   else     # 特定事件
  1077.    if parameter >0
  1078.      events = $game_map.events
  1079.      return events == nil ? nil : events[parameter]
  1080.    else
  1081.      $game_party.return_char(-parameter-2)
  1082.    end
  1083.   end
  1084. end
  1085. end
  1086.  
  1087. #--------------------------------------------------------------------------
  1088. # ● 设定窗口位置和不透明度
  1089. #--------------------------------------------------------------------------
  1090. def reset_window
  1091. if $game_switches[33]
  1092.    #........................................................................
  1093.    # 判定
  1094.    if @popchar >= 0
  1095.      events = $game_map.events
  1096.      if events != nil
  1097.        character = get_character(@popchar)
  1098.        x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  1099.        y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  1100.        self.x = x
  1101.        self.y = y
  1102.      end
  1103.    elsif @popchar == -1
  1104.      self.x = -4
  1105.      self.y = -4
  1106.      self.width = 648
  1107.      self.height = 488
  1108.    else
  1109.      if $game_temp.in_battle
  1110.        self.y = 16
  1111.        #y = 16
  1112.      else
  1113.        case $game_system.message_position
  1114.        when 0 # 上
  1115.          #self.y = 16
  1116.          self.y = 16
  1117.        when 1 # 中
  1118.          self.y = 160
  1119.        when 2 # 下
  1120.          self.y = 350
  1121.        end
  1122.        self.x = 32
  1123.        if @face_file == nil
  1124.          self.width = 580
  1125.        else
  1126.          self.width = 600
  1127.          self.x -= 60
  1128.        end
  1129.        self.height = 120
  1130.      end
  1131.    end
  1132.    self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1133.    if @face_file != nil
  1134.      self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  1135.    end
  1136.    if @popchar == -1
  1137.      self.opacity = 255
  1138.      self.back_opacity = 0
  1139.    elsif $game_system.message_frame == 0
  1140.      self.opacity = 255
  1141.      self.back_opacity = 200
  1142.    else
  1143.      self.opacity = 0
  1144.      self.back_opacity = 200
  1145.    end
  1146.    #........................................................................
  1147. else
  1148.   if $game_temp.in_battle
  1149.     #self.y = 16
  1150.     self.y = 16
  1151.   else
  1152.     case $game_system.message_position
  1153.     when 0  # 上
  1154.       self.y = 16
  1155.       #self.y = 16
  1156.     when 1  # 中
  1157.       self.y = 160
  1158.     when 2  # 下
  1159.       self.y = 304
  1160.     end
  1161.   end
  1162.   if $game_system.message_frame == 0
  1163.     self.opacity = 255
  1164.   else
  1165.     self.opacity = 0
  1166.   end
  1167.   self.back_opacity = FUKI::MES_OPACITY
  1168. end
  1169. end
  1170.  
  1171. #--------------------------------------------------------------------------
  1172. # ● line_height-66rpg
  1173. #--------------------------------------------------------------------------
  1174. # 返回値:行高
  1175. #--------------------------------------------------------------------------
  1176. def line_height
  1177.   return 32
  1178.   if self.contents.font.size >= 20 and self.contents.font.size <= 24
  1179.     return 32
  1180.   else
  1181.     return self.contents.font.size * 15 / 10
  1182.   end
  1183. end
  1184. #--------------------------------------------------------------------------
  1185. # ● \V 变换-66rpg
  1186. #--------------------------------------------------------------------------
  1187. def convart_value(option, index)
  1188.   option == nil ? option = "" : nil
  1189.   option.downcase!
  1190.   case option
  1191.     when "i"
  1192.       unless $data_items[index].name == nil
  1193.         r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  1194.       end
  1195.     when "w"
  1196.       unless $data_weapons[index].name == nil
  1197.         r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  1198.       end
  1199.     when "a"
  1200.       unless $data_armors[index].name == nil
  1201.         r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  1202.       end
  1203.     when "s"
  1204.       unless $data_skills[index].name == nil
  1205.         r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  1206.       end
  1207.     else
  1208.     r = $game_variables[index]
  1209.   end
  1210.   r == nil ? r = "" : nil
  1211.   return r
  1212. end
  1213. #--------------------------------------------------------------------------
  1214. # ● 刷新画面
  1215. #--------------------------------------------------------------------------
  1216. def update
  1217.   if $game_switches[33]
  1218.    #........................................................................
  1219.    super
  1220.    if @fade_in
  1221.      self.contents_opacity += 24
  1222.      if @input_number_window != nil
  1223.        @input_number_window.contents_opacity += 24
  1224.      end
  1225.      if self.contents_opacity == 255
  1226.        @fade_in = false
  1227.      end
  1228.      return
  1229.    end
  1230.    @now_text = nil if @now_text == ""
  1231.  
  1232.    if @now_text != nil and @mid_stop == false
  1233.      if @write_wait > 0
  1234.        @write_wait -= 1
  1235.        return
  1236.      end
  1237.      text_not_skip = $game_system.typing
  1238.      while true
  1239.        @max_x = @x if @max_x < @x
  1240.        @max_y = @y if @max_y < @y
  1241.        if (c = @now_text.slice!(/./m)) != nil
  1242.          if c == "\000"
  1243.            c = "\\"
  1244.          end
  1245.          if c == "\001"
  1246.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1247.            color = $1.to_i
  1248.            if color >= 0 and color <= 7
  1249.              self.contents.font.color = text_color(color)
  1250.            end
  1251.            c = ""
  1252.          end
  1253.          if c == "\002"
  1254.            if @gold_window == nil and @popchar <= 0
  1255.              @gold_window = Window_Gold.new
  1256.              @gold_window.x = 560 - @gold_window.width
  1257.              if $game_temp.in_battle
  1258.                @gold_window.y = 192
  1259.              else
  1260.                @gold_window.y = self.y >= 128 ? 32 : 384
  1261.              end
  1262.              @gold_window.opacity = self.opacity
  1263.              @gold_window.back_opacity = self.back_opacity
  1264.            end
  1265.            c = ""
  1266.          end
  1267.          if c == "\003"
  1268.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1269.            speed = $1.to_i
  1270.            if speed >= 0 and speed <= 19
  1271.              @write_speed = speed
  1272.            end
  1273.            c = ""
  1274.          end
  1275.          if c == "\004"
  1276.            @now_text.sub!(/\[(.*?)\]/, "")
  1277.            buftxt = $1.dup.to_s
  1278.            if buftxt.match(/\//) == nil and buftxt != "" then
  1279.              $game_system.soundname_on_speak = "Audio/SE/" + buftxt
  1280.            else
  1281.              $game_system.soundname_on_speak = buftxt.dup
  1282.            end
  1283.            c = ""
  1284.          elsif c == "\004"
  1285.            c = ""
  1286.          end
  1287.          if c == "\005"
  1288.            @write_wait += 5
  1289.            c = ""
  1290.          end
  1291.          if c == "\006"
  1292.            @write_wait += 20
  1293.            c = ""
  1294.          end
  1295.          if c == "\016"
  1296.            text_not_skip = false
  1297.            c = ""
  1298.          end
  1299.          if c == "\017"
  1300.            text_not_skip = true
  1301.            c = ""
  1302.          end
  1303.          if c == "\020"
  1304.            @mid_stop = true
  1305.            c = ""
  1306.          end
  1307.          if c == "\021"
  1308.            terminate_message
  1309.            return
  1310.          end
  1311.          if c == "\023"
  1312.            @indent = @x
  1313.            c = ""
  1314.          end
  1315.          if c == "\024"
  1316.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1317.            @opacity = $1.to_i
  1318.            c = ""
  1319.          end
  1320.          if c == "\025"
  1321.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1322.            self.contents.font.size = [[$1.to_i, 6].max, 32].min
  1323.            c = ""
  1324.          end
  1325.          if c == "\026"
  1326.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1327.            @x += $1.to_i
  1328.            c = ""
  1329.          end
  1330.          if c == "\027"
  1331.            @now_text.sub!(/\[(.*?)\]/, "")
  1332.            @x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
  1333.            if $game_system.soundname_on_speak != ""
  1334.              Audio.se_play($game_system.soundname_on_speak)
  1335.            end
  1336.            c = ""
  1337.          end
  1338.          if c == "\030"
  1339.            @now_text.sub!(/\[(.*?)\]/, "")
  1340.            self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  1341.           if $game_system.soundname_on_speak != ""
  1342.              Audio.se_play($game_system.soundname_on_speak)
  1343.            end
  1344.            @x += 24
  1345.            c = ""
  1346.          end
  1347.          if c == "\n"
  1348.            if @lines >= $game_temp.choice_start
  1349.              @cursor_width = [@cursor_width, @max_x - @face_indent].max
  1350.            end
  1351.            @lines += 1
  1352.            @y += 1
  1353.            @x = 0 + @indent + @face_indent
  1354.            if @lines >= $game_temp.choice_start
  1355.              @x = 8 + @indent + @face_indent
  1356.            end
  1357.            c = ""
  1358.          end
  1359.          if c != ""
  1360.            # 文字描画
  1361.            @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), c, @opacity)
  1362.            if $game_system.soundname_on_speak != "" then
  1363.            Audio.se_play($game_system.soundname_on_speak)
  1364.            end
  1365.          end
  1366.          if Input.press?(Input::C) and $game_switches[34]
  1367.            text_not_skip = false
  1368.          end
  1369.          if Input.press?(Input::B)
  1370.            text_not_skip = false
  1371.          end
  1372.        else
  1373.          text_not_skip = true
  1374.          break
  1375.        end
  1376.        # 終了判定
  1377.        if text_not_skip
  1378.          break
  1379.        end
  1380.      end
  1381.      @write_wait += @write_speed
  1382.      return
  1383.    end
  1384.    if @input_number_window != nil
  1385.      @input_number_window.update
  1386.      # 決定
  1387.      if Input.trigger?(Input::C)
  1388.        $game_system.se_play($data_system.decision_se)
  1389.        $game_variables[$game_temp.num_input_variable_id] =
  1390.        @input_number_window.number
  1391.        $game_map.need_refresh = true
  1392.        @input_number_window.dispose
  1393.        @input_number_window = nil
  1394.        terminate_message
  1395.      end
  1396.      return
  1397.    end
  1398.    if @contents_showing
  1399.      if $game_temp.choice_max == 0
  1400.        self.pause = true
  1401.      end
  1402.      # 取消
  1403.      if Input.trigger?(Input::B)
  1404.        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1405.          $game_system.se_play($data_system.cancel_se)
  1406.          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1407.          terminate_message
  1408.        end
  1409.      end
  1410.      # 決定
  1411.      if Input.trigger?(Input::C)
  1412.        if $game_temp.choice_max > 0
  1413.          $game_system.se_play($data_system.decision_se)
  1414.          $game_temp.choice_proc.call(self.index)
  1415.        end
  1416.        if @mid_stop
  1417.          @mid_stop = false
  1418.          return
  1419.        else
  1420.          terminate_message
  1421.        end
  1422.      end
  1423.      return
  1424.    end
  1425.    if @fade_out == false and $game_temp.message_text != nil
  1426.      @contents_showing = true
  1427.      $game_temp.message_window_showing = true
  1428.      refresh
  1429.      Graphics.frame_reset
  1430.      self.visible = true
  1431.      self.contents_opacity = 0
  1432.    if @input_number_window != nil
  1433.      @input_number_window.contents_opacity = 0
  1434.    end
  1435.      @fade_in = true
  1436.      return
  1437.    end
  1438.    if self.visible
  1439.      @fade_out = true
  1440.      self.opacity -= 48
  1441.      if self.opacity == 0
  1442.        self.visible = false
  1443.        @fade_out = false
  1444.        $game_temp.message_window_showing = false
  1445.      end
  1446.      return
  1447.    end
  1448.    #........................................................................
  1449. else
  1450.   super
  1451.   # 呼出模式下跟随事件移动
  1452.   if @tale != nil
  1453.     pos = get_fuki_pos(self.width, self.height)
  1454.     self.x = pos[0]
  1455.     self.y = pos[1]
  1456.  
  1457.     tale_pos = get_tale_pos
  1458.     @tale.x = tale_pos[0]
  1459.     @tale.y = tale_pos[1]
  1460.  
  1461.     if @name_win != nil
  1462.       name_pos = get_name_pos
  1463.       @name_win.x = name_pos[0]
  1464.       @name_win.y = name_pos[1]
  1465.       case @face_pic_txt
  1466.         when 0  # 文字
  1467.           @name_contents.x = @name_win.x + 12
  1468.           @name_contents.y = @name_win.y + 8
  1469.         when 1  # 图片
  1470.           @name_contents.x = @name_win.x + 2
  1471.           @name_contents.y = @name_win.y + 2
  1472.         end
  1473.     end
  1474.   end
  1475.  
  1476.   # 渐变的情况下
  1477.   if @fade_in
  1478.     self.contents_opacity += 24
  1479.     if @name_win != nil
  1480.       @name_win.opacity += 24
  1481.     end
  1482.     if @tale != nil
  1483.       @tale.opacity += 24
  1484.     end
  1485.     if @input_number_window != nil
  1486.       @input_number_window.contents_opacity += 24
  1487.     end
  1488.     if self.contents_opacity == 255
  1489.       @fade_in = false
  1490.     end
  1491.     return
  1492.   end
  1493.   # 显示信息中的情况下
  1494.   if @contents_drawing
  1495.     refresh_drawtext
  1496.     return
  1497.   end
  1498.   # 输入数值的情况下
  1499.   if @input_number_window != nil
  1500.     @input_number_window.update
  1501.     # 确定
  1502.     if Input.trigger?(Input::C)
  1503.       $game_system.se_play($data_system.decision_se)
  1504.       $game_variables[$game_temp.num_input_variable_id] =
  1505.         @input_number_window.number
  1506.       $game_map.need_refresh = true
  1507.       # 释放输入数值窗口
  1508.       @input_number_window.dispose
  1509.       @input_number_window = nil
  1510.       terminate_message
  1511.     end
  1512.     return
  1513.   end
  1514.   # 显示信息结束的情况下
  1515.   if @contents_showing_end
  1516.     # 不是显示选择项且不是呼出对话模式则显示暂停标志
  1517.     if $game_temp.choice_max == 0 and @tale == nil
  1518.       self.pause = true
  1519.     else
  1520.       self.pause = false
  1521.     end
  1522.     # 取消
  1523.     if Input.trigger?(Input::B)
  1524.       if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1525.         $game_system.se_play($data_system.cancel_se)
  1526.         $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1527.         terminate_message
  1528.       end
  1529.     end
  1530.     # 确定
  1531.     if Input.trigger?(Input::C)
  1532.       if $game_temp.choice_max > 0
  1533.         $game_system.se_play($data_system.decision_se)
  1534.         $game_temp.choice_proc.call(self.index)
  1535.       end
  1536.       terminate_message
  1537.       # 释放呼出窗口
  1538.       del_fukidasi
  1539.     end
  1540.     return
  1541.   end
  1542.   # 在渐变以外的状态下有等待显示的信息与选择项的场合
  1543.   if @fade_out == false and $game_temp.message_text != nil
  1544.     @contents_showing = true
  1545.     $game_temp.message_window_showing = true
  1546.     reset_window
  1547.     refresh_create
  1548.     if @name_win != nil
  1549.       @name_win.opacity = 0
  1550.     end
  1551.     if @tale != nil
  1552.       @tale.opacity = 0
  1553.     end
  1554.     Graphics.frame_reset
  1555.     self.visible = true
  1556.     self.contents_opacity = 0
  1557.     if @input_number_window != nil
  1558.       @input_number_window.contents_opacity = 0
  1559.     end
  1560.     @fade_in = true
  1561.     return
  1562.   end
  1563.   # 没有可以显示的信息、但是窗口为可见的情况下
  1564.   if self.visible
  1565.     @fade_out = true
  1566.     self.opacity -= 48
  1567.     if @name_win != nil
  1568.       @name_win.opacity -= 48
  1569.     end
  1570.     if @tale != nil
  1571.       @tale.opacity -= 48
  1572.     end
  1573.     if self.opacity == 0
  1574.       self.visible = false
  1575.       @fade_out = false
  1576.       $game_temp.message_window_showing = false
  1577.       del_fukidasi
  1578.     end
  1579.     return
  1580.   end
  1581. end
  1582. end
  1583.  
  1584. #--------------------------------------------------------------------------
  1585. # ● 透過文字描画 - 66rpg
  1586. #--------------------------------------------------------------------------
  1587. # target :描画対象。Bitmapクラスを指定。
  1588. # x :x座標
  1589. # y :y座標
  1590. # str  :描画文字列
  1591. # opacity:透過率(0~255)
  1592. # 返回値 :文字幅(@x増加値)。
  1593. #--------------------------------------------------------------------------
  1594. def opacity_draw_text(target, x, y, str,opacity)
  1595.   height = target.font.size
  1596.   width = target.text_size(str).width
  1597.   opacity = [[opacity, 0].max, 255].min
  1598.   if opacity == 255
  1599.     target.draw_text(x, y, width, height, str)
  1600.     return width
  1601.   else
  1602.     if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  1603.       @opacity_text_buf.dispose
  1604.       @opacity_text_buf = Bitmap.new(width, height)
  1605.     else
  1606.       @opacity_text_buf.clear
  1607.     end
  1608.     @opacity_text_buf.font.size = target.font.size
  1609.     @opacity_text_buf.draw_text(0, 0, width, height, str)
  1610.     target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  1611.   return width
  1612.   end
  1613. end
  1614. def ruby_draw_text(target, x, y, str,opacity)
  1615.   sizeback = target.font.size
  1616.   target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
  1617.   rubysize = [rubysize, 6].max
  1618.  
  1619.   opacity = [[opacity, 0].max, 255].min
  1620.   split_s = str.split(/,/)
  1621.  
  1622.   split_s[0] == nil ? split_s[0] = "" : nil
  1623.   split_s[1] == nil ? split_s[1] = "" : nil
  1624.  
  1625.   height = sizeback + rubysize
  1626.   width = target.text_size(split_s[0]).width
  1627.  
  1628.   target.font.size = rubysize
  1629.   ruby_width = target.text_size(split_s[1]).width
  1630.   target.font.size = sizeback
  1631.  
  1632.   buf_width = [target.text_size(split_s[0]).width, ruby_width].max
  1633.  
  1634.   width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0
  1635.  
  1636.   if opacity == 255
  1637.     target.font.size = rubysize
  1638.     target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
  1639.     target.font.size = sizeback
  1640.     target.draw_text(x, y, width, target.font.size, split_s[0])
  1641.     return width
  1642.   else
  1643.     if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
  1644.       @opacity_text_buf.dispose
  1645.       @opacity_text_buf = Bitmap.new(buf_width, height)
  1646.     else
  1647.       @opacity_text_buf.clear
  1648.     end
  1649.     @opacity_text_buf.font.size = rubysize
  1650.     @opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
  1651.     @opacity_text_buf.font.size = sizeback
  1652.     @opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
  1653.     if sub_x >= 0
  1654.       target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  1655.     else
  1656.       target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  1657.     end
  1658.     return width
  1659.   end
  1660. end
  1661.  
  1662. #--------------------------------------------------------------------------
  1663. # ● 释放
  1664. #--------------------------------------------------------------------------
  1665. def dispose
  1666. if $game_switches[33]
  1667.   #........................................................................
  1668.   terminate_message
  1669.   if @gaiji_cache != nil
  1670.     unless @gaiji_cache.disposed?
  1671.       @gaiji_cache.dispose
  1672.     end
  1673.   end
  1674.   unless @opacity_text_buf.disposed?
  1675.     @opacity_text_buf.dispose
  1676.   end
  1677.   $game_temp.message_window_showing = false
  1678.   if @input_number_window != nil
  1679.     @input_number_window.dispose
  1680.   end
  1681.   super
  1682.   #........................................................................
  1683. else
  1684.   terminate_message
  1685.   $game_temp.message_window_showing = false
  1686.   if @input_number_window != nil
  1687.     @input_number_window.dispose
  1688.   end
  1689.   super
  1690. end
  1691. end
  1692.  
  1693. #--------------------------------------------------------------------------
  1694. # ● 信息结束处理
  1695. #--------------------------------------------------------------------------
  1696. def terminate_message
  1697. if $game_switches[33]
  1698.   #........................................................................
  1699.   self.active = false
  1700.   self.pause = false
  1701.   self.index = -1
  1702.   self.contents.clear
  1703.   # 清除显示中标志
  1704.   @contents_showing = false
  1705.   # 呼叫信息调用
  1706.   if $game_temp.message_proc != nil
  1707.     $game_temp.message_proc.call
  1708.   end
  1709.   # 清除文章、选择项、输入数值的相关变量
  1710.   $game_temp.message_text = nil
  1711.   $game_temp.message_proc = nil
  1712.   $game_temp.choice_start = 99
  1713.   $game_temp.choice_max = 0
  1714.   $game_temp.choice_cancel_type = 0
  1715.   $game_temp.choice_proc = nil
  1716.   $game_temp.num_input_start = 99
  1717.   $game_temp.num_input_variable_id = 0
  1718.   $game_temp.num_input_digits_max = 0
  1719.   # 开放金钱窗口
  1720.   if @gold_window != nil
  1721.     @gold_window.dispose
  1722.     @gold_window = nil
  1723.   end
  1724.   if @name_window_frame != nil
  1725.     @name_window_frame.dispose
  1726.     @name_window_frame = nil
  1727.   end
  1728.   if @name_window_text != nil
  1729.     @name_window_text.dispose
  1730.     @name_window_text = nil
  1731.   end
  1732.   if @right_picture != nil and @right_keep == true
  1733.     @right_picture.dispose
  1734.   end   
  1735.   if @left_picture != nil and @left_keep == true
  1736.     @left_picture.dispose
  1737.   end
  1738.   #........................................................................
  1739. else
  1740.   self.active = false
  1741.   self.pause = false
  1742.   self.index = -1
  1743.   self.contents.clear
  1744.   # 清除显示中标志
  1745.   @contents_showing = false
  1746.   @contents_showing_end = false
  1747.   # 呼叫信息调用
  1748.   if $game_temp.message_proc != nil
  1749.     $game_temp.message_proc.call
  1750.   end
  1751.   # 清除文章、选择项、输入数值的相关变量
  1752.   $game_temp.message_text = nil
  1753.   $game_temp.message_proc = nil
  1754.   $game_temp.choice_start = 99
  1755.   $game_temp.choice_max = 0
  1756.   $game_temp.choice_cancel_type = 0
  1757.   $game_temp.choice_proc = nil
  1758.   $game_temp.num_input_start = 99
  1759.   $game_temp.num_input_variable_id = 0
  1760.   $game_temp.num_input_digits_max = 0
  1761.   # 释放金钱窗口
  1762.   if @gold_window != nil
  1763.     @gold_window.dispose
  1764.     @gold_window = nil
  1765.   end
  1766. end
  1767. end
  1768.  
  1769. #--------------------------------------------------------------------------
  1770. # ● 刷新光标矩形
  1771. #--------------------------------------------------------------------------
  1772. def update_cursor_rect
  1773. if $game_switches[33]
  1774.   #.........................................................................
  1775.   if @index >= 0
  1776.     n = $game_temp.choice_start + @index
  1777.     self.cursor_rect.set(4 + @indent + @face_indent, n * 32 + 4, @cursor_width, 32)
  1778.   else
  1779.     self.cursor_rect.empty
  1780.   end
  1781.   #.........................................................................
  1782. else
  1783.   if @index >= 0
  1784.     n = $game_temp.choice_start + @index
  1785.     self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  1786.   else
  1787.     self.cursor_rect.empty
  1788.   end
  1789. end
  1790. end
  1791. #--------------------------------------------------------------------------
  1792. # ● 取得普通文字色
  1793. #--------------------------------------------------------------------------
  1794. def normal_color
  1795.   nil_color = Color.new(0,0,0,0)
  1796.   if FUKI::FUKI_COLOR != nil_color
  1797.     color = FUKI::FUKI_COLOR
  1798.   else
  1799.     color = super
  1800.   end
  1801.   return color
  1802. end
  1803. end
  1804.  
  1805. #==============================================================================
  1806. # ■ Interpreter
  1807. #==============================================================================
  1808.  
  1809. class Interpreter
  1810. #--------------------------------------------------------------------------
  1811. # ● 设置事件
  1812. #     event_id : 事件 ID
  1813. #--------------------------------------------------------------------------
  1814. alias setup_fuki setup
  1815. def setup(list, event_id)
  1816.   setup_fuki(list, event_id)
  1817.   # 如果不是战斗中
  1818.   if !($game_temp.in_battle)
  1819.     # 记录事件 ID
  1820.     $active_event_id = event_id
  1821.   end
  1822. end
  1823. end
  1824.  
  1825. #==============================================================================
  1826. # ■ Scene_Map
  1827. #==============================================================================
  1828.  
  1829. class Scene_Map
  1830. #--------------------------------------------------------------------------
  1831. # ● 主处理
  1832. #--------------------------------------------------------------------------
  1833. def main
  1834.   # 生成活动块
  1835.   @spriteset = Spriteset_Map.new
  1836.   # 生成信息窗口
  1837.   @message_window = Window_FukiMessage.new
  1838.   # 执行过渡
  1839.   Graphics.transition
  1840.   # 主循环
  1841.   loop do
  1842.     # 刷新游戏画面
  1843.     Graphics.update
  1844.     # 刷新输入信息
  1845.     Input.update
  1846.     # 刷新画面
  1847.     update
  1848.     # 如果画面切换的话就中断循环
  1849.     if $scene != self
  1850.       break
  1851.     end
  1852.   end
  1853.   # 准备过渡
  1854.   Graphics.freeze
  1855.   # 释放活动块
  1856.   @spriteset.dispose
  1857.   # 释放信息窗口
  1858.   @message_window.dispose
  1859.   # 标题画面切换中的情况下
  1860.   if $scene.is_a?(Scene_Title)
  1861.     # 淡入淡出画面
  1862.     Graphics.transition
  1863.     Graphics.freeze
  1864.   end
  1865. end
  1866. end
  1867.  
  1868. #==============================================================================
  1869. # ■ Window_InputNumber
  1870. #==============================================================================
  1871.  
  1872. class Window_InputNumber < Window_Base
  1873. #--------------------------------------------------------------------------
  1874. # ● 初始化对像
  1875. #     digits_max : 位数
  1876. #--------------------------------------------------------------------------
  1877. def initialize(digits_max)
  1878.   @digits_max = digits_max
  1879.   @number = 0
  1880.   # 从数字的幅度计算(假定与 0~9 等幅)光标的幅度
  1881.   dummy_bitmap = Bitmap.new(32, 32)
  1882.   dummy_bitmap.font.size = FUKI::MES_FONT_SIZE
  1883.   @cursor_width = dummy_bitmap.text_size("0").width + 8
  1884.   dummy_bitmap.dispose
  1885.   super(0, 0, @cursor_width * @digits_max + 32, 64)
  1886.   self.contents = Bitmap.new(width - 32, height - 32)
  1887.   self.contents.font.size = FUKI::MES_FONT_SIZE
  1888.   self.z += 9999
  1889.   self.opacity = 0
  1890.   @index = 0
  1891.   refresh
  1892.   update_cursor_rect
  1893. end
  1894. end

Lv5.捕梦者 (版主)

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
帖子
11485

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

2
发表于 2014-1-12 10:50:53 | 只看该作者
  1. # 字体大小
  2. MES_FONT_SIZE = 22    # 呼出对话框
  3. NAME_FONT_SIZE = 14   # 角色名字窗口
复制代码
这里的确是修改对话框内字体的大小的。
请你再尝试一下吧。
  1. # 呼出对话框的相对位置(纵坐标)
  2. POP_SHIFT_TOP = 0         # 表示位置为上的时候
  3. POP_SHIFT_UNDER = 0       # 表示位置为下的时候
复制代码
是位置的修改。
具体第二个问题表示不明白楼主要的效果。
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
76
在线时间
1379 小时
注册时间
2012-7-5
帖子
1698

开拓者

3
发表于 2014-1-12 11:26:48 | 只看该作者
关于第二个问题,其实是描绘在窗口上下左右-16像素一张名字叫contents的画布上,不好改@( ̄- ̄)@改动坐标后超出那个16像素范围的(contents的范围)字符描绘都会看不到

  -fk: -azogi:
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
432
在线时间
4175 小时
注册时间
2010-6-26
帖子
6474
4
发表于 2014-1-12 12:44:42 | 只看该作者
美丽晨露 发表于 2014-1-12 10:50
这里的确是修改对话框内字体的大小的。
请你再尝试一下吧。是位置的修改。
具体第二个问题表示不明白楼主要 ...

这个和FUKI对话框的版本有问题,楼主没有给出具体代码是无法修改的。楼主这个估计是从《沉默的纸飞机》那里面获取的对话框,这个数据就不好找了。

点评

使用的脚本已经贴出来了,求解答。目前觉得最头疼的就是文字大小改了没有效果……  发表于 2014-1-14 01:26
潜水,专心忙活三次元工作了……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
455
在线时间
7 小时
注册时间
2014-1-9
帖子
4
5
 楼主| 发表于 2014-1-14 01:24:55 | 只看该作者
美丽晨露 发表于 2014-1-12 10:50
这里的确是修改对话框内字体的大小的。
请你再尝试一下吧。是位置的修改。
具体第二个问题表示不明白楼主要 ...

字体大小又改一次了可是还是没有效果?

第二个问题就是对话框中的第一行文字太靠下了,我想往上调一点,只调文字不调框,请问怎么弄?

使用的脚本已经贴出来了
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
432
在线时间
4175 小时
注册时间
2010-6-26
帖子
6474
6
发表于 2014-1-15 17:48:11 | 只看该作者
本帖最后由 eve592370698 于 2014-1-15 17:55 编辑
Chisato 发表于 2014-1-14 01:24
字体大小又改一次了可是还是没有效果?

第二个问题就是对话框中的第一行文字太靠下了,我想往上调一点, ...


这个对话框其实是老版本FUKI和FUKI66二合一对话框,而且这个对话框有bug,所以还是建议您放弃吧。因为参数修改只对老FUKI起作用,对FUKI66根本不起作用。

点评

原来如此,我说怎么改来改去都不对。请问新版本叫什么呢?我搜什么能搜到?  发表于 2014-1-15 20:23
潜水,专心忙活三次元工作了……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-30 11:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表