Layer/Tier problem on PTS (apparently)
Hi all,
I went on the PTS to test my QuickMapNav addon (draws links with area names on the map) and it looks like it now draws the text under the map so we can't see it and click it anymore. Sometimes it randomly works as usual though. I use CT label Lua Code:
Lua Code:
I tried to play with SetDrawLayer but I don't know how many layers are there and which one to choose... Any idea how I can fix this? |
One way to find the info would be: Wiki, search, layer :confused:
LMGTFY: https://wiki.esoui.com/w/index.php?t...rawlayer&go=Go Solinur has added a every good exaplanation "Drawing Order" there recently (https://wiki.esoui.com/Controls#Rend...FLayer.2FLevel) and I have linked it everywhere where the DrawLayerr, DrawLevel and DrawTier are used. btw: DrawTier is the important part, after that DrawLayer, then DrawLevel: I've added that to the PTS API101035 thread too: https://www.esoui.com/forums/showthread.php?p=45812, post #4 includes the info from ZOs + Solinur's explanation at the Wiki. A good way to find such info will be to check the API function files and the Wiki for the search terms. If you need to find something about DrawLayer search in the API txt doc. files and you'll find the possible constants to use, which then can be used to search further in the ZOs source code e.g. Code:
h5. DrawLayer |
Thanks for the infos Beartram,
Whether or not I add DrawLayer, DrawTier and DrawLevel, (I added it on only one control to test) all textlinks are displayed a first (or sometimes not... The random part is disturbing) but when I right click to get to a bigger map (e. g. Tamriel or The Aurbis or parent zone) all textlinks are then displayed under the map and it stays like that. :confused: |
Looks like the map update then uses a SetDrawTier and layer and level to bring the map on the top again.
So you also need to update your labels again at that point if they are not anchored to the same map control and would just stay the same they were before. Maybe this sort of stuff would help, if not too performance intensive: Lua Code:
But I'm unsure if this is the correct callback for your rightclicking, maybe it fires too often and you should simple react on the rightclick event and set your clicked control/all needed controls on top again (maybe delayed). |
About the "OnWorldMapChanged" callback that's already how the addon works.
I've tried to set the draw tier, layer and level values after that (I use to set them on init) but same results. By using GetDrawLayer() etc, I can confirm that the controls draw tier, layer and level are set but ignored once I have right clicked to go to a parent map, if I don't right click and navigate from map to map through the links provided by the addon it works as usual. |
Is the right click changing the DrawTier, DrawLayer or DrawLevel?
Compare the tier, layer and level of the worldmap to your "base" controls (the shown labels/clickable links or the custom control you have parented them as childs to, if it is not the WorldMap which is the parent). If not: The map might just become "the same" tier, layer and level (or a hgher level!) and thus the controls fall behind the map again by this. It's what I understood is the reason that the controls sometimes vanish, or that the texture controls are still shown but a clickable button all of sudden is behind the texture and not clickable anymore then. Search the worldmap code for SetDrawTier or SetDrawLayer or SetDrawLevel, maybe you'll find the exact values that are set to the map as the map changes/updates. And you just need to set the same to your controls then and increase the drawlevel by 1 to show it on top again. What ZOSDanBatson wrote about it: Quote:
|
Just posting data collected for "science"... While looking for a solution :)
ZO_WorldMapScroll DrawTier 0 DrawLayer 1 DrawLevel 0 ZO_WorldMapContainer DrawTier 1 DrawLayer 1 DrawLevel 0 map tiles DrawTier 1 DrawLayer 0 DrawLevel 0 |
Ah I have it fixed :
I was setting DrawTier DrawLayer and DrawLevel on a child control while doing nothing to the parent control, once I modified these values for the parent control it started working well. :) |
All times are GMT -6. The time now is 02:09 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI