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

Project1

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

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
343 小时
注册时间
2010-8-14
帖子
315
跳转到指定楼层
1
发表于 2012-3-3 16:20:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我想把游戏开始时“开始”“继续”按钮的字体改大一点,不过在RGSS里找不到哪里有字体的大小

Lv3.寻梦者

双子人

梦石
0
星屑
3165
在线时间
3616 小时
注册时间
2009-4-4
帖子
4154

开拓者

2
发表于 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])
复制代码
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 11:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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