查看: 1689|回复: 0

[已经过期] 我创建了个带选项的窗口,可是每次disposed的时候会报错

[复制链接]
梦石
0
星屑
50
在线时间
92 小时
注册时间
2012-1-30
回帖
23
发表于 2016-8-11 14:03:55 | 显示全部楼层 |阅读模式

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

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

×
脚本“Window_Base”第 84 行:发生 RGSSError 。

disposed window



求大神帮忙解答下呀,其他普通信息窗口都没问题,就这个有问题


[pre lang="ruby"]#==============================================================================
# ■ Map_Name_Display
#------------------------------------------------------------------------------
#  右上角打开功能菜单链接
#==============================================================================

class Window_Page_Turn < Window_HorzCommand
  #--------------------------------------------------------------------------
  # ● 初始化
  #--------------------------------------------------------------------------
  def initialize
    super(Graphics.width - window_width, 26)
  end
  
  #--------------------------------------------------------------------------
  # ● 获取项目的内容的宽
  #--------------------------------------------------------------------------
  def item_width
    60
  end
  #--------------------------------------------------------------------------
  # ● 获取项目内容的高
  #--------------------------------------------------------------------------
  def item_height
    24
  end
  #--------------------------------------------------------------------------
  # ● 获取项目的宽
  #--------------------------------------------------------------------------
  def window_width
    140
  end
  #--------------------------------------------------------------------------
  # ● 获取项目的高
  #--------------------------------------------------------------------------
  def window_height
    32
  end
  #--------------------------------------------------------------------------
  # ● 获取项目边距
  #--------------------------------------------------------------------------
  def standard_padding
    return 4
  end
  #--------------------------------------------------------------------------
  # ● 获取项目的内容
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect_for_text(index)
    contents.font.size = 18
    contents.font.bold = true
    self.contents.draw_text(rect.x, 3, rect.width, 22, command_name(index),1)
  end
  #--------------------------------------------------------------------------
  # ● 获取项目的绘制矩形
  #--------------------------------------------------------------------------
  alias pageturn_item_rect item_rect
  def item_rect(index)
    rect = Rect.new
    rect.width = item_width - 4
    rect.height = item_height - 4
    rect.x = index % col_max * (item_width + spacing) + 2
    rect.y = index / col_max * item_height + 2
    rect
  end
  #--------------------------------------------------------------------------
  # ● 获取项目的绘制矩形(内容用)
  #--------------------------------------------------------------------------
  def item_rect_for_text(index)
    rect = pageturn_item_rect(index)
    rect.x += 4
    rect.width -= 8
    rect
  end
  #--------------------------------------------------------------------------
  # ● 获取项目选择列表
  #--------------------------------------------------------------------------
  def make_command_list
    if $game_variables[$variables_plies] == 1
      add_command("回  城", :gohome)
    else
      add_command("上一层", :last_plies)
    end
    add_command("下一层", :next_plies)
  end
end[/pre]
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

在本版发帖返回顶部