WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Positioning buttons,text, etc. on the world map. (https://www.wowinterface.com/forums/showthread.php?t=32573)

bsmorgan 05-18-10 01:11 PM

Positioning buttons,text, etc. on the world map.
 
There are various addons that place buttons, checkboxes, text, etc. on the world map border. The objects are correctly positioned when the world map is full screen but incorrectly positioned when the world map is in its partial screen position.

How can an addon correctly position an object on both? How can an addon tell when the map is resized? A pointer to existing code which does the correctly would be great.

Thanks for your help.

Regards,

Brad

Wella 05-19-10 06:51 AM

I don't know about your specific issue, but as a work-around you could always install Cartographer, which will easily down-size the map for you without having to use that silly minimize button.

Torhal 05-19-10 06:08 PM

Cartographer is dead. I don't understand why nobody believes this, even when the developers say it's so.

Use Mapster.

bsmorgan 05-20-10 05:08 PM

I'm not interested in a "workaround", I'm interested in how to program the solution...

When the map is full screen, an addon, Gatherer, positions a "Hide Items" button on the lower border of the frame; an addon, Atlas, positions the coordinates of the player and the cursor on the lower border of the frame; an addon, MozzFullWorldMap, positions a "Show Unexplored Areas" checkbox on the top border of the frame.

When the map is reduced to its smaller, not full screen size by Blizzard's button next to the X in the upper right corner, the above three addons incorrectly position their objects. In fact, they appear to have no knowledge that the map can change size.

I want to know how to position these objects correctly. Blizzard's "Show Quest Objectives" works. I'd look at that code if I could but the site wowcompares.com appears to be down. I was hoping that asking in a developer discussion forum I might get a better response.

Thanks,

Brad

Xrystal 05-20-10 05:43 PM

Okay this is what the QuestObjectives checkbox does when the resize event is triggered.

Code:

function WorldMapQuestShowObjectives_AdjustPosition()
        if ( WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE ) then
                WorldMapQuestShowObjectives:SetPoint("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", -3 - WorldMapQuestShowObjectivesText:GetWidth(), -26);
        else
                WorldMapQuestShowObjectives:SetPoint("BOTTOMRIGHT", WorldMapPositioningGuide, "BOTTOMRIGHT", -15 - WorldMapQuestShowObjectivesText:GetWidth(), 4);
        end
end

I believe MozzFullWorldMap is now in the hands of Spiel (Scott) so I am sure if you point out the resizing bug to him he will incorporate a fix as soon as he is able to.

Either way hopefully this code block will be enough for you to work out what you need to do for the other alignments.

bsmorgan 05-20-10 06:32 PM

Thank you very much. That was exactly what I was looking for!

Regards,

Brad

spiel2001 05-21-10 04:05 AM

I will get a fix into MFWM for this (as well as the world coordinates display in nUI)

spiel2001 05-23-10 09:04 AM

I have fixed this issue in MozzFullWorldMap and nUI both... I'll be uploading both shortly.


All times are GMT -6. The time now is 05:57 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI