module PARA_LEFT_CURSOR
FILE_NAME = "Cursor"
TYPE = 0
end
class Window_Base
alias cursor_rect_para_lcr cursor_rect
def cursor_rect=(rect)
if PARA_LEFT_CURSOR::TYPE == 1
super(rect)
end
empty = Rect.new(0,0,0,0)
if rect != empty and self.visible != false and @index != -1
if @cursor == nil or @cursor.disposed?
@cursor = Sprite.new
@cursor.bitmap = RPG::Cache.windowskin(PARA_LEFT_CURSOR::FILE_NAME)
end
@cursor.x = self.x + rect.x
cy = (rect.height-32) / 2
@cursor.y = self.y + cy + rect.y + 16
@cursor.z = self.z + 2
elsif @cursor != nil
@cursor.dispose
end
end
alias dispose_para_cur dispose
def dispose
super
if @cursor != nil
@cursor.dispose
end
end
def visible=(bool)
super
if @cursor != nil and bool == false
@cursor.dispose
end
end
def x=(x)
super
if @index != nil
update_cursor_rect
end
end
def y=(y)
super
if @index != nil
update_cursor_rect
end
end
end