| 
 
| 赞 | 40 |  
| VIP | 559 |  
| 好人卡 | 234 |  
| 积分 | 47 |  
| 经验 | 251834 |  
| 最后登录 | 2025-10-7 |  
| 在线时间 | 5233 小时 |  
 Lv3.寻梦者 (版主) 八宝粥的基叔 
	梦石0 星屑4687 在线时间5233 小时注册时间2009-4-29帖子14320 
 | 
| atarry 发表于 2011-11-8 18:17 ![]() 这个能看懂,但是前面定义一个TEXT-2不会定义,试了好几次都出错,因为我不会编程,麻烦能不能这个也跟我 ...
复制代码#=============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
#  特技及物品的说明、角色的状态显示的窗口。
#=============================================================================
class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 544, WLH + 32)  #  <-----修改super(0, 0, 544, WLH + 32) 
  end
  #--------------------------------------------------------------------------
  # ● 设置文字
  #  text  : 显示于窗口内的字符串
  #  align : 对其 (0..靠左对齐, 1..居中对齐, 2..靠右对齐)
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
      @text = text
      @align = align
    end
  end
  #--------------------------------------------------------------------------
  # ● 设置文字
  #  text  : 显示于窗口内的字符串
  #  align : 对其 (0..靠左对齐, 1..居中对齐, 2..靠右对齐)
  #--------------------------------------------------------------------------
  def set_text2(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
      @text = text
      @align = align
    end
  end
end
 | 
 |