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

Project1

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

[已经过期] RMXP怎么把字体框框调大?

[复制链接]

Lv2.观梦者

梦石
0
星屑
597
在线时间
374 小时
注册时间
2011-10-11
帖子
311
跳转到指定楼层
1
发表于 2016-10-13 20:30:14 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
就是把显示文章的字体调大点显示文章的框框调大点能一个屏幕多打些字,多显示些字体求指教。


LL0077330

Lv1.梦旅人

梦石
0
星屑
125
在线时间
171 小时
注册时间
2014-4-14
帖子
151
2
发表于 2016-10-16 06:18:29 | 只看该作者
修改的地方已经标注
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Window_Message
  3. #------------------------------------------------------------------------------
  4. #  显示文章的信息窗口。
  5. #==============================================================================
  6. class Window_Message < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化状态
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     #super(80, 304, 480, 160)
  12.     super(80, 204, 480, 260)
  13.   ######横坐标,纵坐标,宽,高
  14.     self.contents = Bitmap.new(width - 32, height - 32)
  15.     self.visible = false
  16.     self.z = 9998
  17.     @fade_in = false
  18.     @fade_out = false
  19.     @contents_showing = false
  20.     @cursor_width = 0
  21.     self.active = false
  22.     self.index = -1
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 释放
  26.   #--------------------------------------------------------------------------
  27.   def dispose
  28.     terminate_message
  29.     $game_temp.message_window_showing = false
  30.     if @input_number_window != nil
  31.       @input_number_window.dispose
  32.     end
  33.     super
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # ● 处理信息结束
  37.   #--------------------------------------------------------------------------
  38.   def terminate_message
  39.     self.active = false
  40.     self.pause = false
  41.     self.index = -1
  42.     self.contents.clear
  43.     # 清除显示中标志
  44.     @contents_showing = false
  45.     # 呼叫信息调用
  46.     if $game_temp.message_proc != nil
  47.       $game_temp.message_proc.call
  48.     end
  49.     # 清除文章、选择项、输入数值的相关变量
  50.     $game_temp.message_text = nil
  51.     $game_temp.message_proc = nil
  52.     $game_temp.choice_start = 99
  53.     $game_temp.choice_max = 0
  54.     $game_temp.choice_cancel_type = 0
  55.     $game_temp.choice_proc = nil
  56.     $game_temp.num_input_start = 99
  57.     $game_temp.num_input_variable_id = 0
  58.     $game_temp.num_input_digits_max = 0
  59.     # 开放金钱窗口
  60.     if @gold_window != nil
  61.       @gold_window.dispose
  62.       @gold_window = nil
  63.     end
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● 刷新
  67.   #--------------------------------------------------------------------------
  68.   def refresh
  69.     self.contents.clear
  70.     self.contents.font.color = normal_color
  71.     x = y = 0
  72.     @cursor_width = 0
  73.     # 到选择项的下一行字
  74.     if $game_temp.choice_start == 0
  75.       x = 8
  76.     end
  77.     # 有等待显示的文字的情况下
  78.     if $game_temp.message_text != nil
  79.       text = $game_temp.message_text
  80.       # 限制文字处理
  81.       begin
  82.         last_text = text.clone
  83.         text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  84.       end until text == last_text
  85.       text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  86.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  87.       end
  88.       # 为了方便、将 "\\\\" 变换为 "\000"
  89.       text.gsub!(/\\\\/) { "\000" }
  90.       # "\\C" 变为 "\001" 、"\\G" 变为 "\002"
  91.       text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  92.       text.gsub!(/\\[Gg]/) { "\002" }
  93.       # c 获取 1 个字 (如果不能取得文字就循环)
  94.       while ((c = text.slice!(/./m)) != nil)
  95.         # \\ 的情况下
  96.         if c == "\000"
  97.           # 还原为本来的文字
  98.           c = "\\"
  99.         end
  100.         # \C[n] 的情况下
  101.         if c == "\001"
  102.           # 更改文字色
  103.           text.sub!(/\[([0-9]+)\]/, "")
  104.           color = $1.to_i
  105.           if color >= 0 and color <= 7
  106.             self.contents.font.color = text_color(color)
  107.           end
  108.           # 下面的文字
  109.           next
  110.         end
  111.         # \G 的情况下
  112.         if c == "\002"
  113.           # 生成金钱窗口
  114.           if @gold_window == nil
  115.             @gold_window = Window_Gold.new
  116.             @gold_window.x = 560 - @gold_window.width
  117.             if $game_temp.in_battle
  118.               @gold_window.y = 192
  119.             else
  120.               @gold_window.y = self.y >= 128 ? 32 : 384
  121.             end
  122.             @gold_window.opacity = self.opacity
  123.             @gold_window.back_opacity = self.back_opacity
  124.           end
  125.           # 下面的文字
  126.           next
  127.         end
  128.         # 另起一行文字的情况下
  129.         if c == "\n"
  130.           # 刷新选择项及光标的高
  131.           if y >= $game_temp.choice_start
  132.             @cursor_width = [@cursor_width, x].max
  133.           end
  134.           # y 加 1
  135.           y += 1
  136.           x = 0
  137.           # 移动到选择项的下一行
  138.           if y >= $game_temp.choice_start
  139.             x = 8
  140.           end
  141.           # 下面的文字
  142.           next
  143.         end
  144.         #####################
  145.         # 描绘文字
  146.        self.contents.font.size = 30 ##文字大小
  147.         self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  148.         ########################
  149.         # x 为要描绘文字的加法运算
  150.         x += self.contents.text_size(c).width
  151.       end
  152.     end
  153.     # 选择项的情况
  154.     if $game_temp.choice_max > 0
  155.       @item_max = $game_temp.choice_max
  156.       self.active = true
  157.       self.index = 0
  158.     end
  159.     # 输入数值的情况
  160.     if $game_temp.num_input_variable_id > 0
  161.       digits_max = $game_temp.num_input_digits_max
  162.       number = $game_variables[$game_temp.num_input_variable_id]
  163.       @input_number_window = Window_InputNumber.new(digits_max)
  164.       @input_number_window.number = number
  165.       @input_number_window.x = self.x + 8
  166.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  167.     end
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # ● 设置窗口位置与不透明度
  171.   #--------------------------------------------------------------------------
  172.   def reset_window
  173.     if $game_temp.in_battle
  174.       self.y = 16
  175.     else
  176.       case $game_system.message_position
  177.       when 0  # 上
  178.         self.y = 16
  179.       when 1  # 中
  180.         self.y = 160
  181.         #################
  182.       when 2  # 下
  183.         self.y = 204#304
  184.         ##################
  185.       end
  186.     end
  187.     if $game_system.message_frame == 0
  188.       self.opacity = 255
  189.     else
  190.       self.opacity = 0
  191.     end
  192.     self.back_opacity = 160
  193.   end
  194.   #--------------------------------------------------------------------------
  195.   # ● 刷新画面
  196.   #--------------------------------------------------------------------------
  197.   def update
  198.     super
  199.     # 渐变的情况下
  200.     if @fade_in
  201.       self.contents_opacity += 24
  202.       if @input_number_window != nil
  203.         @input_number_window.contents_opacity += 24
  204.       end
  205.       if self.contents_opacity == 255
  206.         @fade_in = false
  207.       end
  208.       return
  209.     end
  210.     # 输入数值的情况下
  211.     if @input_number_window != nil
  212.       @input_number_window.update
  213.       # 确定
  214.       if Input.trigger?(Input::C)
  215.         $game_system.se_play($data_system.decision_se)
  216.         $game_variables[$game_temp.num_input_variable_id] =
  217.           @input_number_window.number
  218.         $game_map.need_refresh = true
  219.         # 释放输入数值窗口
  220.         @input_number_window.dispose
  221.         @input_number_window = nil
  222.         terminate_message
  223.       end
  224.       return
  225.     end
  226.     # 显示信息中的情况下
  227.     if @contents_showing
  228.       # 如果不是在显示选择项中就显示暂停标志
  229.       if $game_temp.choice_max == 0
  230.         self.pause = true
  231.       end
  232.       # 取消
  233.       if Input.trigger?(Input::B)
  234.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  235.           $game_system.se_play($data_system.cancel_se)
  236.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  237.           terminate_message
  238.         end
  239.       end
  240.       # 确定
  241.       if Input.trigger?(Input::C)
  242.         if $game_temp.choice_max > 0
  243.           $game_system.se_play($data_system.decision_se)
  244.           $game_temp.choice_proc.call(self.index)
  245.         end
  246.         terminate_message
  247.       end
  248.       return
  249.     end
  250.     # 在渐变以外的状态下有等待显示的信息与选择项的场合
  251.     if @fade_out == false and $game_temp.message_text != nil
  252.       @contents_showing = true
  253.       $game_temp.message_window_showing = true
  254.       reset_window
  255.       refresh
  256.       Graphics.frame_reset
  257.       self.visible = true
  258.       self.contents_opacity = 0
  259.       if @input_number_window != nil
  260.         @input_number_window.contents_opacity = 0
  261.       end
  262.       @fade_in = true
  263.       return
  264.     end
  265.     # 没有可以显示的信息、但是窗口为可见的情况下
  266.     if self.visible
  267.       @fade_out = true
  268.       self.opacity -= 48
  269.       if self.opacity == 0
  270.         self.visible = false
  271.         @fade_out = false
  272.         $game_temp.message_window_showing = false
  273.       end
  274.       return
  275.     end
  276.   end
  277.   #--------------------------------------------------------------------------
  278.   # ● 刷新光标矩形
  279.   #--------------------------------------------------------------------------
  280.   def update_cursor_rect
  281.     if @index >= 0
  282.       n = $game_temp.choice_start + @index
  283.       self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  284.     else
  285.       self.cursor_rect.empty
  286.     end
  287.   end
  288. end
Vanyogin
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-22 06:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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