I created these Functions to move a label:
and it works fine but sometimes when cursor moves outside the project it is not working properly.
Is there a solution or a better way to do it ?
Code:
function Forward(labelName) local currentPos = Label.GetPos(labelName); local newPos = currentPos.X + 10; for lab = currentPos.X, newPos, 0.150 do Label.SetPos(labelName, lab, currentPos.Y); end end function Backward(labelName) local currentPos = Label.GetPos(labelName); local newPos = currentPos.X - 10; for lab = currentPos.X, newPos, -0.150 do Label.SetPos(labelName, lab, currentPos.Y); end end
Is there a solution or a better way to do it ?