查看: 2361|回复: 2

标题画面的字体颜色与字体类型?怎么改?

  [复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-4-7
回帖
30
发表于 2008-4-13 21:59:49 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

酱油的

梦石
0
星屑
1840
在线时间
2161 小时
注册时间
2007-12-22
回帖
3216

贵宾

发表于 2008-4-13 22:09:21 | 显示全部楼层
第二次看見如此棘手的問題了==
具體需要重寫一個 Window_Command
複製粘貼原版的 Window_Command
修改class name 爲 Window_Command_002
打開Scene_Title
找到40行
修改    @command_window = Window_Command.new(192, [s1, s2, s3])
爲      @command_window = Window_Command_002.new(192, [s1, s2, s3])

然後重新打開 Window_Command_002
修改
  #--------------------------------------------------------------------------
  # ● 描绘项目
  #     index : 项目编号
  #     color : 文字色
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end

加入分歧:
  #--------------------------------------------------------------------------
  # ● 描绘项目
  #     index : 项目编号
  #     color : 文字色
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    if @commands[index] == "新游戏"
      self.contents.font.color = system_color
      self.contents.font.name = ["华文行楷"]
    else
      self.contents.font.color = color
      self.contents.font.name = ["黑体"]     
    end
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end


系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

梦石
0
星屑
50
在线时间
27 小时
注册时间
2008-2-13
回帖
1700
发表于 2008-4-13 23:21:56 | 显示全部楼层
建议用图片标题菜单:http://rpg.blue/web/htm/news167.htm
好吧,果然换个签名就没人认识我了。我承认我被时间埋没了
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部