本帖最后由 灯笼菜刀王 于 2018-4-1 15:57 编辑 #-------------------------------------------------------------------------- # ● 更新光标矩形 #-------------------------------------------------------------------------- def update_cursor_rect # 光标位置不满 0 的情况下 if @index < 0 self.cursor_rect.empty return end # 获取当前的行 # row = @index / @column_max # 当前行被显示开头行前面的情况下 #if row < self.top_row # 从当前行向开头行滚动 # self.top_row = row #end # 当前行被显示末尾行之后的情况下 #if row > self.top_row + (self.page_row_max - 1) # 从当前行向末尾滚动 # self.top_row = row - (self.page_row_max - 1) #end # 计算光标的宽度 cursor_width = self.width / @column_max - 32 # 计算光标坐标 x = @index * 144 y = @index # 更新光标矩形 self.cursor_rect.set(x, y, cursor_width / 4 - 8, 32) end 中间那段卷屏效果删了就可以了... 至于原因嘛, top_row在Window_Selectable里有y坐标咯, 你没重定义这个 |
这么触的嘛,但是xp不是已有不少物品分类脚本吗? 先下载下来看看(顺便盗窃思路) |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-2-19 04:04
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.