World map overlay frame and SetMovable
Hello.
I'm adding a new overlay frame to my world map that contains one frame. I'm trying to allow the user to move this frame on drag and drop. The problem I'm finding is that if the frame is not movable, whenever I minimize/maximize the world map my frame adapts to the world map container correcly remaining in the correct position, but as soon as I make it movable, the frame detaches from the world map and it doesn't adapt anymore, so if in the maximized version it appears in the top right corner of the map, in the minimize version it appears on top of my minimap. Is it posible to keep my frame inside the world map and maintain the last position while maximized/minimized? This is my code: Code:
WorldMapFrame:AddOverlayFrame("MyTemplate", "FRAME", "CENTER", WorldMapFrame:GetCanvasContainer(), "TOP", 0, 0); Code:
<?xml version="1.0"?> |
If you are trying to build an overlay over the entire map frame (its borders, UI elements, etc.), then something like this might help:
Lua Code:
If you are trying to build something on the map canvas itself which appears at an x/y coordinate and can be dragged to another x/y coordinate, then you should take a look at MapCanvas_DataProviderBase.lua. Lua Code:
XML Code:
toc Code:
Disclaimer: I just quickly wrote this together by taking snippets of a much longer file. I'm probably missing something to make it work. |
All times are GMT -6. The time now is 06:11 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI