def update_cursor_rect #@back.bitmap = RPG::Cache.menu("item_command"+type.to_s) # 光标位置不满 0 的情况下 if @index < 0 self.cursor_rect.empty return end # 获取当前的行 column = @index # 当前行被显示开头行前面的情况下 if column < self.top_column # 从当前行向开头行滚动 self.top_column = column end # 当前行被显示末尾行之后的情况下 if column > self.top_column + (self.page_column_max - 1) # 从当前行向末尾滚动 self.top_column = column - (self.page_column_max - 1) end @right.x = self.x+72+self.top_column.to_f*66.0*(4*66)/(@item_max.to_f*66) # 计算光标的宽度 cursor_width = 1200 # 计算光标坐标 x =32+ @index*66 - self.ox-1# 8 # y = 4 #@index*20 - self.oy-1 # 更新光标矩形 self.cursor_rect.set(x, y, 66 ,80) end
4-5.png (404.09 KB, 下载次数: 9)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |