Hi,
We’re in the middle of a crossroads and have no clue what to do before uploading our app to the App Store now that it’s opening again. We have to finally update our Corona build to the latest .2113 one, but doing so we have to now adapt to the new graphics engine which is causing us some bugs when using graphicsCompatibility v1.
The problem we’re having is that whenever we have a newText and update its text using the .text property, if the newText original label was for example ‘’, and we update it to something longer, say ‘Online’, we can not reset its reference point to fit the new width.
For example
local t = display.newText('', 0, 0, native.systemFont, 12) t:setReferencePoint(display.CenterLeftReferencePoint) t.x = 100; t.y = 100; t.origX = t.x; t.origY = t.y; local function delay() t.text = 'Online' t:setReferencePoint(display.CenterLeftReferencePoint) t.x = t.origX; t.y = t.origY; end timer.performWithDelay(100, delay)
In the example above, after setting the label of the text to ‘Online’ it is not possible to change the reference of the object to fit its new width and so we can not reposition the object accordingly.
Is there any workaround to solve this asap or is it just us doing something wrong? Would appreciate all help.