Cannot display map labels anymore
Cannot display map labels anymore
I just pulled the lastest source upgrading from test4-final to fix the special exits problem. I have found that my labels no longer show on the map. Just to check for incompatible data, I created a new label on the map using the dialog based label creator from the mapper context menu. The label seems to have completed successfully when I retrieve the labels programmatically, but the new label does not show on the map. Is this a known issue?
Re: Cannot display map labels anymore
Yes, the API for creating labels is now "stale", having been replaced internally by another option of drawing labels in the background, adding pictures to map labels (so you can have backgrounds on maps), and customizable text. The Lua API hasn't been updated for this yet and uses the old mechanism which isn't rendered by the mapper anymore.
A patch here: https://bugs.launchpad.net/mudlet/+bug/1008280 restores the functionality.
A patch here: https://bugs.launchpad.net/mudlet/+bug/1008280 restores the functionality.
Re: Cannot display map labels anymore
Thanks, that solved the problem. Look forward to using the new labels features you mentioned in the future.
Re: Cannot display map labels anymore
You might want to include the following as well, which will make the labels act their correct size with respect to mouse clicks:
lp.drawText( lr, Qt::AlignLeft, it.value().text, &br );
Put that right after:
lp.drawText( lr, Qt::AlignLeft, it.value().text, &br );
Re: Cannot display map labels anymore
^Thanks.
A question though, do I have to make all he labels again when the new Label functionality comes out?
A question though, do I have to make all he labels again when the new Label functionality comes out?
Re: Cannot display map labels anymore
Your Old labels will be converted internally.