How to get the type of a location?
I'm making an addon that adds pins for certain town services to the compass. These are "Locations" in the API.
Currently I'm figuring out what type each location is by taking the icon filename using GetMapLocationIcon(n), then parsing it to get the filename, then comparing that with the icons for the location types I'm interested in (e.g. if filename == "servicepin_stable.dds") Is there a better way to get the Location type? |
Quote:
Search for "h5. MapDisplayPinType" in the docs to get the full list : https://github.com/esoui/esoui/blob/...umentation.txt EDIT: sorry, I wasn't fully awake and misread the question, personally I use texture file name too to identify them. |
Afaik there is no "location type" ID or similar identifier.
The texture names currently seem to be the best way to find the locaiton type, because they do not need any "translation" (multi language support) like names of locations or contents of the location pin names would need (if the pin name even would provide that info, like a crafting station must not contain any "crafting" text or similar). Maybe have a look at Votan's addon here where he changed some of the colors of the location pins: https://www.esoui.com/downloads/info...PinColors.html Votan is quite experienced with maps and pins so perhaps he shows you another way here. -> If you spy or reuse code please give credit |
Quote:
I have not found any other way, but using the texture path as an language-invariant identifier. So, you are right. I would use the texture path. |
All times are GMT -6. The time now is 06:55 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI