Thread Tools Display Modes
05-18-10, 01:11 PM   #1
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
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
  Reply With Quote
05-19-10, 06:51 AM   #2
Wella
A Rage Talon Dragon Guard
 
Wella's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 322
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.
__________________
Addons I use, not that any of you care
* Bejeweled - For boring 5 minute flights to Tanaris
* Genie - Blizzard really should have implemented bag sorting by now
* ncHoverBind - I'm a Lock, what can you expect?
* oGlow - Agan, a missing feature
* Recount - Derp
* ShooShards - Another missing feature


"Your idea is good. So i will try it."
- popmissa
  Reply With Quote
05-19-10, 06:08 PM   #3
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Cartographer is dead. I don't understand why nobody believes this, even when the developers say it's so.

Use Mapster.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
05-20-10, 05:08 PM   #4
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
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
  Reply With Quote
05-20-10, 05:43 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
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.
__________________
  Reply With Quote
05-20-10, 06:32 PM   #6
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Thank you very much. That was exactly what I was looking for!

Regards,

Brad
  Reply With Quote
05-21-10, 04:05 AM   #7
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I will get a fix into MFWM for this (as well as the world coordinates display in nUI)
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
  Reply With Quote
05-23-10, 09:04 AM   #8
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I have fixed this issue in MozzFullWorldMap and nUI both... I'll be uploading both shortly.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Positioning buttons,text, etc. on the world map.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off