function initCursor(cursor)
    -- Инициализируем курсоры
	local entity

    -- Default
    entity = CreateSpriteEntity('Data/Textures/Cursors/default.png')
    entity:setAnimationSize(26, 34)
    entity:setHotSpot(1, 1)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorDefault', entity)

    -- Empty
    entity = CreateSpriteEntity('Data/Textures/Cursors/empty.png')
    entity:setAnimationSize(1, 1)
    cursor:setSpriteCursor('CursorEmpty', entity)
    
    -- Active
    entity = CreateSpriteEntity('Data/Textures/Cursors/active.png')
    entity:setAnimationSize(34, 46)
    entity:setHotSpot(16, 10)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorActive', entity)
    
    -- Hand (for tool)
    entity = CreateSpriteEntity('Data/Textures/Cursors/active.png')
    entity:setAnimationSize(34, 46)
    entity:setHotSpot(16, 10)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorTool', entity)
    
    -- Glass
    entity = CreateSpriteEntity('Data/Textures/Cursors/glass.png')
    entity:setAnimationSize(28, 34)
    entity:setHotSpot(14, 17)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorGlass', entity)
    
    -- Eye (ho)
    entity = CreateSpriteEntity('Data/Textures/Cursors/eye.png')
    entity:setAnimationSize(62, 40)
    entity:setHotSpot(31, 20)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorEye', entity)
    
    -- Question (bbt)
    entity = CreateSpriteEntity('Data/Textures/Cursors/question.png')
    entity:setAnimationSize(26, 40)
    entity:setHotSpot(13, 20)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorQuestion', entity)
    
    -- Dialog
    entity = CreateSpriteEntity('Data/Textures/Cursors/dialog.png')
    entity:setAnimationSize(38, 28)
    entity:setHotSpot(12, 28)
    entity:setFramesCount(24)
    entity:setFPS(24)
    entity:setMode(_ANIM_LOOP)
    GetCursorEntity():setSpriteCursor('CursorDialog', entity)
    
    -- Camera
    entity = CreateSpriteEntity('Data/Textures/Cursors/camera.png')
    entity:setAnimationSize(44, 34)
    entity:setHotSpot(22, 17)
    GetCursorEntity():setSpriteCursor('CursorCamera', entity)
    
    -- Cursor down
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_down.png')
    entity:setAnimationSize(30, 36)
    entity:setHotSpot(15, 18)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorDown', entity)
    
    -- Cursor left_down
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_ld.png')
    entity:setAnimationSize(30, 32)
    entity:setHotSpot(30, 0)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorLeftDown', entity)
    
    -- Cursor left
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_left.png')
    entity:setAnimationSize(36, 30)
    entity:setHotSpot(19, 15)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorLeft', entity)
    
    -- Cursor left_up
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_lu.png')
    entity:setAnimationSize(32, 30)
    entity:setHotSpot(32, 30)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorLeftUp', entity)
    
    -- Cursor up
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_up.png')
    entity:setAnimationSize(30, 36)
    entity:setHotSpot(15, 18)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorUp', entity)
    
    -- Cursor right_up
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_ru.png')
    entity:setAnimationSize(28, 28)
    entity:setHotSpot(0, 28)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorRightUp', entity)
    
    -- Cursor right
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_right.png')
    entity:setAnimationSize(36, 30)
    entity:setHotSpot(18, 15)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorRight', entity)
    
    -- Cursor right_down
    entity = CreateSpriteEntity('Data/Textures/Cursors/door_rd.png')
    entity:setAnimationSize(32, 30)
    entity:setHotSpot(0, 0)
    entity:setFramesCount(1)
    GetCursorEntity():setSpriteCursor('CursorRightDown', entity)


	-- - for touch purposes
	if cursor.onStateChange ~= nil then
	cursor.onStateChange:add(
		function(prev, next)
			print('Switching cursor ' .. (prev and prev:getName() or 'nil') .. ' to ' .. (next and next:getName() or 'nil'))
			if prev ~= nil then
				prev:setActive(true)
				--prev:hide()
				prev:destroyEffectors()
                local eff = CreateAnimationEffector()
                eff:attachTo(prev)
                eff:setKey(_TRACK_O, 0  , 1  )
                eff:setKey(_TRACK_O, 0.1, 0.3)
                eff:setKey(_TRACK_O, 0.2, 0.1)
                eff:setKey(_TRACK_O, 0.3, 0  )

                --eff:setKey(_TRACK_S, 0  , 1  )
                --eff:setKey(_TRACK_S, 0.1, 1.1)
                --eff:setKey(_TRACK_S, 0.2, 1.2)
                --eff:setKey(_TRACK_S, 0.3, 1.25)
                eff:play()
			 end
			
			if next ~= nil then
				next:show()
				next:setActive(true)
				next:destroyEffectors()
                local eff = CreateAnimationEffector()
                eff:attachTo(next)
                eff:setKey(_TRACK_O, 0  , 0  )
                eff:setKey(_TRACK_O, 0.1, 1  )
                eff:setKey(_TRACK_S, 0  , 0.8)
                eff:setKey(_TRACK_S, 0.1, 1  )
                eff:play()
				
			end
		end
	)

	end

	--cursor:setState('CursorDefault')
end
