Positioning maplabel
Posted: Thu Apr 21, 2016 4:20 pm
I'm playing around with map labels right now
createMapLabel(areaID, text, posx, posy, posz, fgRed, fgGreen, fgBlue, bgRed, bgGreen, bgBlue, zoom, fontSize, showOnTop, noScaling)
In particular, i'm adding labels for zone edges (the name of the bordering zone). First issue i'm running into is x,y,z look to be always the top left corner of the label. If I create it on the left size of the map, however, i'm going to want the label to display to the left of the room, not to the right of it (on top of/or behind existing rooms). I did try subtracting a bit from posx to move where the label is actually created, which sortof works - Until you zoom in/out of the map, at which point the labels gets moved, usually to the wrong place.
Also, i'd like to have clicking on the label switch the map display to that area.
Questions:
Is what i'm trying to do something that has been done previously in another script, and am I just using the zoom/scaling/etc properties incorrectly? Anyone have a link to a script that already does this I could look at?
Do map labels have a click callback function?
createMapLabel(areaID, text, posx, posy, posz, fgRed, fgGreen, fgBlue, bgRed, bgGreen, bgBlue, zoom, fontSize, showOnTop, noScaling)
In particular, i'm adding labels for zone edges (the name of the bordering zone). First issue i'm running into is x,y,z look to be always the top left corner of the label. If I create it on the left size of the map, however, i'm going to want the label to display to the left of the room, not to the right of it (on top of/or behind existing rooms). I did try subtracting a bit from posx to move where the label is actually created, which sortof works - Until you zoom in/out of the map, at which point the labels gets moved, usually to the wrong place.
Also, i'd like to have clicking on the label switch the map display to that area.
Questions:
Is what i'm trying to do something that has been done previously in another script, and am I just using the zoom/scaling/etc properties incorrectly? Anyone have a link to a script that already does this I could look at?
Do map labels have a click callback function?