You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say that there's a text field named "fieldname" that has the value "0".
I now change that "0" to a "1":
lwf.SetText("fieldname", "1");
When calling lwf.GetText("fieldname") it does in fact return "1", so the value is stored successfully, however it is not updated visually.
If I continue to change the valule from 1 to 2 to 3 etc nothing updates visually until 10 is hit. Then it reflects the actual value. But 11, 12 etc is not reflected.
Seems like it only renders the new value of the text field if it has changed in string length?
If I change the x/y position of the MovieClip that contains the textfield it also successfully displays the actual value in the text field.
I assume the problem is just that you've forgotten to set the text field as being "dirty" when a new value is received, unless the new value has a different string length. I haven't exactly worked out how to workaround this problem yet though, I had hoped I could just set the root movie's x property to the same as it was previously but that doesn't make LWF update the visuals unfortunately.
The text was updated successfully, but these errors were encountered:
Seems like the problem is in lwf_combinedmesh_text.cs
Inside:
public override void Render(Matrix matrix, ColorTransform colorTransform, int renderingIndex, int renderingCount, bool visible)
There is the followng:
int z = renderingCount - renderingIndex;
if (m_z != z) {
m_updated = true;
m_z = z;
}
If I remove the length check the text field works as it should:
int z = renderingCount - renderingIndex;
//if (m_z != z) {
m_updated = true;
m_z = z;
//}
I don't know why that check is there in the first place (trying to save performance?) but without it things actually work like expected.
Can someone that has more insight in LWF than me remove the check from the LWF source code? Unless of course you discover that the problem is elsewhere.
Say that there's a text field named "fieldname" that has the value "0".
I now change that "0" to a "1":
lwf.SetText("fieldname", "1");
When calling lwf.GetText("fieldname") it does in fact return "1", so the value is stored successfully, however it is not updated visually.
If I continue to change the valule from 1 to 2 to 3 etc nothing updates visually until 10 is hit. Then it reflects the actual value. But 11, 12 etc is not reflected.
Seems like it only renders the new value of the text field if it has changed in string length?
If I change the x/y position of the MovieClip that contains the textfield it also successfully displays the actual value in the text field.
I assume the problem is just that you've forgotten to set the text field as being "dirty" when a new value is received, unless the new value has a different string length. I haven't exactly worked out how to workaround this problem yet though, I had hoped I could just set the root movie's x property to the same as it was previously but that doesn't make LWF update the visuals unfortunately.
The text was updated successfully, but these errors were encountered: