查看: 1797|回复: 1

Window_Selectable

  [复制链接]
梦石
0
星屑
55
在线时间
142 小时
注册时间
2008-7-25
回帖
199
发表于 2009-1-16 22:03:56 | 显示全部楼层 |阅读模式

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

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

×
Window_Selectable中控制窗口滚动的方法是哪几个?
O(∩_∩)O谢谢!
版务信息:本贴由楼主自主结贴~

天仙

梦石
0
星屑
720
在线时间
184 小时
注册时间
2008-4-15
回帖
4872

贵宾

发表于 2009-1-16 22:05:27 | 显示全部楼层
  1.   #--------------------------------------------------------------------------
  2.   # ● 計算行數
  3.   #--------------------------------------------------------------------------
  4.   def row_max
  5.     return (@item_max + @column_max - 1) / @column_max
  6.   end
  7.   #--------------------------------------------------------------------------
  8.   # ● 獲取首行
  9.   #--------------------------------------------------------------------------
  10.   def top_row
  11.     return self.oy / WLH
  12.   end
  13.   #--------------------------------------------------------------------------
  14.   # ● 設置首行
  15.   #     row : 顯示在最上的行
  16.   #--------------------------------------------------------------------------
  17.   def top_row=(row)
  18.     row = 0 if row < 0
  19.     row = row_max - 1 if row > row_max - 1
  20.     self.oy = row * WLH
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 獲取一頁能顯示的行數
  24.   #--------------------------------------------------------------------------
  25.   def page_row_max
  26.     return (self.height - 32) / WLH
  27.   end
  28.   #--------------------------------------------------------------------------
  29.   # ● 獲取一頁能顯示的選項
  30.   #--------------------------------------------------------------------------
  31.   def page_item_max
  32.     return page_row_max * @column_max
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● 獲取末行
  36.   #--------------------------------------------------------------------------
  37.   def bottom_row
  38.     return top_row + page_row_max - 1
  39.   end
  40.   #--------------------------------------------------------------------------
  41.   # ● 設置末行
  42.   #     row : 顯示在最底的行
  43.   #--------------------------------------------------------------------------
  44.   def bottom_row=(row)
  45.     self.top_row = row - (page_row_max - 1)
  46.   end
复制代码

系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
VA脚本开工中...
偷窃脚本1.0 - 已完成
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部