Label.ComputeWidth fails with composed text
Posted: 07 Mar 2016, 15:51
Label.ComputeWidth returns incorrect values when trying to compute width of translated or composed text.
Example:
or
Looks like this function is taking into account raw text, containing PU1 and PU2 characters instead actual visible output. Tried also to call time function one tick after setting new value, but it hasn't changed anything.
Example:
Code: Select all
Label.Value = _("Continue");
log(Label.ComputeWidth(Label.Value));
Code: Select all
Label.Value = TL::Compose("Current attacker: %1", Players[0].User.Name);
log(Label.ComputeWidth(Label.Value));