查看: 1712|回复: 0

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

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

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

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

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

disposed window



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


  1. #==============================================================================
  2. # ■ Map_Name_Display
  3. #------------------------------------------------------------------------------
  4. #  右上角打开功能菜单链接
  5. #==============================================================================

  6. class Window_Page_Turn < Window_HorzCommand
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(Graphics.width - window_width, 26)
  12.   end
  13.   
  14.   #--------------------------------------------------------------------------
  15.   # ● 获取项目的内容的宽
  16.   #--------------------------------------------------------------------------
  17.   def item_width
  18.     60
  19.   end
  20.   #--------------------------------------------------------------------------
  21.   # ● 获取项目内容的高
  22.   #--------------------------------------------------------------------------
  23.   def item_height
  24.     24
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 获取项目的宽
  28.   #--------------------------------------------------------------------------
  29.   def window_width
  30.     140
  31.   end
  32.   #--------------------------------------------------------------------------
  33.   # ● 获取项目的高
  34.   #--------------------------------------------------------------------------
  35.   def window_height
  36.     32
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● 获取项目边距
  40.   #--------------------------------------------------------------------------
  41.   def standard_padding
  42.     return 4
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 获取项目的内容
  46.   #--------------------------------------------------------------------------
  47.   def draw_item(index)
  48.     rect = item_rect_for_text(index)
  49.     contents.font.size = 18
  50.     contents.font.bold = true
  51.     self.contents.draw_text(rect.x, 3, rect.width, 22, command_name(index),1)
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 获取项目的绘制矩形
  55.   #--------------------------------------------------------------------------
  56.   alias pageturn_item_rect item_rect
  57.   def item_rect(index)
  58.     rect = Rect.new
  59.     rect.width = item_width - 4
  60.     rect.height = item_height - 4
  61.     rect.x = index % col_max * (item_width + spacing) + 2
  62.     rect.y = index / col_max * item_height + 2
  63.     rect
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● 获取项目的绘制矩形(内容用)
  67.   #--------------------------------------------------------------------------
  68.   def item_rect_for_text(index)
  69.     rect = pageturn_item_rect(index)
  70.     rect.x += 4
  71.     rect.width -= 8
  72.     rect
  73.   end
  74.   #--------------------------------------------------------------------------
  75.   # ● 获取项目选择列表
  76.   #--------------------------------------------------------------------------
  77.   def make_command_list
  78.     if $game_variables[$variables_plies] == 1
  79.       add_command("回  城", :gohome)
  80.     else
  81.       add_command("上一层", :last_plies)
  82.     end
  83.     add_command("下一层", :next_plies)
  84.   end
  85. end
复制代码

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

本版积分规则

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

在本版发帖返回顶部