#============================================================================== # ** DRG - Scene Menu Animated Cursor # Version : 1.00 # Author : LiTTleDRAgo #============================================================================== module LiTTleDRAgo MENU_CURSOR_IMAGE = 'Cursor' # Place the image to Graphics/Windowskins MENU_CURSOR_FRAME = 8 # Cursor image frame end #============================================================================== # * End Configuration #============================================================================== raise "This script needs Drago - Scene Menu" unless $drago_simple_cms ($imported||={})[:drg_scene_menu_animated_cursor] = 1.00 #============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs menu screen processing. #============================================================================== class Scene_Menu #-------------------------------------------------------------------------- # * Constant #-------------------------------------------------------------------------- FRAME = LiTTleDRAgo::MENU_CURSOR_FRAME #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias_method :create_arrow_bitmap, :create_arrow alias_method :update_arrow_bitmap, :update_arrow #-------------------------------------------------------------------------- # * Create Arrow #-------------------------------------------------------------------------- def create_arrow(*args) create_arrow_bitmap(*args) @sprite_arrow.bitmap = bitmap = windowskin(LiTTleDRAgo::MENU_CURSOR_IMAGE) @sprite_arrow.src_rect.set(0, 0, bitmap.width / FRAME, bitmap.height) end #-------------------------------------------------------------------------- # * update_Arrow #-------------------------------------------------------------------------- def update_arrow(*args) update_arrow_bitmap(*args) width = @sprite_arrow.bitmap.width / FRAME height = @sprite_arrow.bitmap.height @pattern_arrow = ((@pattern_arrow || 0) + 0.2) % FRAME @sprite_arrow.src_rect.set(@pattern_arrow.floor * width, 0, width, height) end end