Well you could do it the boring way, an extra var
Code: Select all
-- Compensate for gl.Text y positioning change between 0.80.0 and 0.80.1
if Game.version == "0.80.2" and not gl.TextAdjusted then
local glText = gl.Text
gl.Text = function(text,x,y,size,options)
if size then
glText(text,x,y+size/4,size,options)
else
glText(text,x,y,size,options)
end
end
gl.TextAdjusted = true
end
Or the fun way, that also is compatible with existing implementations loading first.
Code: Select all
-- Compensate for gl.Text y positioning change between 0.80.0 and 0.80.1
if Game.version == "0.80.2" and debug.getinfo(gl.Text, "S").what == "C" then
local glText = gl.Text
gl.Text = function(text,x,y,size,options)
if size then
glText(text,x,y+size/4,size,options)
else
glText(text,x,y,size,options)
end
end
end
I'm just partial to doing this hack in the most horrible of ways, though.