查看: 4059|回复: 1

[已经解决] 怎样修改RMXP游戏字体大小?

[复制链接]
梦石
0
星屑
50
在线时间
343 小时
注册时间
2010-8-14
回帖
286
发表于 2012-3-3 16:20:15 | 显示全部楼层 |阅读模式

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

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

×
我想把游戏开始时“开始”“继续”按钮的字体改大一点,不过在RGSS里找不到哪里有字体的大小

双子人

梦石
0
星屑
3205
在线时间
3619 小时
注册时间
2009-4-4
回帖
3901

开拓者

发表于 2012-3-3 17:12:12 | 显示全部楼层
本帖最后由 hys111111 于 2012-3-3 17:15 编辑

先复制这个脚本
  1. #==============================================================================
  2. # ■ Window_Command
  3. #------------------------------------------------------------------------------
  4. #  一般的命令选择行窗口。
  5. #==============================================================================

  6. class Window_Command2 < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     width    : 窗口的宽
  10.   #     commands : 命令字符串序列
  11.   #--------------------------------------------------------------------------
  12.   def initialize(width, commands)
  13.     # 由命令的个数计算出窗口的高
  14.     super(0, 0, width, commands.size * 32 + 32)
  15.     @item_max = commands.size
  16.     @commands = commands
  17.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  18.     refresh
  19.     self.index = 0
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● 刷新
  23.   #--------------------------------------------------------------------------
  24.   def refresh
  25.     self.contents.clear
  26.     for i in 0...@item_max
  27.       draw_item(i, normal_color)
  28.     end
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 描绘项目
  32.   #     index : 项目编号
  33.   #     color : 文字色
  34.   #--------------------------------------------------------------------------
  35.   def draw_item(index, color)
  36.     self.contents.font.color = color
  37.     rect = Rect.new(4, 字体大小 * index, self.contents.width - 8, 字体大小)
  38.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  39.     self.contents.draw_text(rect, @commands[index])
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ● 项目无效化
  43.   #     index : 项目编号
  44.   #--------------------------------------------------------------------------
  45.   def disable_item(index)
  46.     draw_item(index, disabled_color)
  47.   end
  48. end
复制代码
然后,Scene_Title大概41行的地方改成
  1. @command_window = Window_Command2.new(192, [s1, s2, s3])
复制代码
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部