Posted by member 305666 on 2008-03-24 21:26:03 link
Hrmm, that last bit of code was cut off and i can't edit for some reason...
This is how fractal does it with lua:
[code]function misc.dynamo (labelname, labelimage, parentlabelname, superparentlabelname)-- parent and superparent cater for hooking, as the currentx of a hooked label is relative to the parent and the parent to the "superparent" etc
if evar.dynamo == "true" then
if parentlabelname == nil then
evar.dynamox = evar[labelname.."currentx"]
evar.dynamoy = evar[labelname.."currenty"]
else
if superparentlabelname == nil then
evar.dynamox = evar[parentlabelname.."currentx"] + evar[labelname.."currentx"]
evar.dynamoy = evar[parentlabelname.."currenty"] + evar[labelname.."currenty"]
else
evar.dynamox = evar[superparentlabelname.."currentx"] + evar[parentlabelname.."currentx"] + evar[labelname.."currentx"]
evar.dynamoy = evar[superparentlabelname.."currenty"] + evar[parentlabelname.."currenty"] + evar[labelname.."currenty"]
end
end
if tonumber(evar.dynamomax) < 16 then evar.dynamomax = 16 end-- they should just turn it off if the want lower. And this keeps the math for the popup good.
if tonumber(evar[labelname.."currentwidth"])
This is how fractal does it with lua:
[code]function misc.dynamo (labelname, labelimage, parentlabelname, superparentlabelname)-- parent and superparent cater for hooking, as the currentx of a hooked label is relative to the parent and the parent to the "superparent" etc
if evar.dynamo == "true" then
if parentlabelname == nil then
evar.dynamox = evar[labelname.."currentx"]
evar.dynamoy = evar[labelname.."currenty"]
else
if superparentlabelname == nil then
evar.dynamox = evar[parentlabelname.."currentx"] + evar[labelname.."currentx"]
evar.dynamoy = evar[parentlabelname.."currenty"] + evar[labelname.."currenty"]
else
evar.dynamox = evar[superparentlabelname.."currentx"] + evar[parentlabelname.."currentx"] + evar[labelname.."currentx"]
evar.dynamoy = evar[superparentlabelname.."currenty"] + evar[parentlabelname.."currenty"] + evar[labelname.."currenty"]
end
end
if tonumber(evar.dynamomax) < 16 then evar.dynamomax = 16 end-- they should just turn it off if the want lower. And this keeps the math for the popup good.
if tonumber(evar[labelname.."currentwidth"])