added 0.9.0 checks to custom cursor operations

This commit is contained in:
Kenny Shields 2013-11-04 11:50:24 -05:00
parent 4734d92376
commit 549a1012a6

View File

@ -70,7 +70,9 @@ function newobject:update(dt)
local hover = self.hover local hover = self.hover
local linksenabled = self.linksenabled local linksenabled = self.linksenabled
local version = love._version
local linkcol = false local linkcol = false
if hover and linksenabled then if hover and linksenabled then
local formattedtext = self.formattedtext local formattedtext = self.formattedtext
local x = self.x local x = self.x
@ -90,7 +92,7 @@ function newobject:update(dt)
if col then if col then
local linkcursorset = self.linkcursorset local linkcursorset = self.linkcursorset
v.hover = true v.hover = true
if not linkcursorset then if not linkcursorset and version == "0.9.0" then
local newcursor = love.mouse.getSystemCursor("hand") local newcursor = love.mouse.getSystemCursor("hand")
love.mouse.setCursor(newcursor) love.mouse.setCursor(newcursor)
self.linkcursorset = true self.linkcursorset = true
@ -109,7 +111,8 @@ function newobject:update(dt)
end end
local linkcursorset = self.linkcursorset local linkcursorset = self.linkcursorset
if not linkcol and linkcursorset then
if not linkcol and linkcursorset and version == "0.9.0" then
self.linkcursorset = false self.linkcursorset = false
love.mouse.setCursor() love.mouse.setCursor()
end end