Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-01-19, 01:54 AM   #1
gemt
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 4
Understanding how to correctly scale the WorldMapFrame

I am very new to modifying UI elements in wow, so bear with me here please.

I am playing around with modifying the default WorldMapFrame. Using fstack i'm able to figure out which elements to hide/show, and i can move and rescale the frame as I want. All good.

However, when rescaling the WorldMapFrame with SetScale, the WorldMap.ScrollContainer children used for highlighting the zone you're mouseovering, and accepting clicks to change zones, no longer appear to be located where they are visually.



The image above tries to show what I mean. The mouse cursor in the image is at the red dot, NE of STV, while STV is highlighted. The WorldMapFrame in the screenshot is scaled down, and all the visuals are correct, except the mouse cursor thinks STV is located in another location than it is visually.

I have been fiddling around with various ways of scaling the WorldMapFrame, including trying to also explicitly scale the WorldMapFrame.ScrollContainer, or by resizing it with SetWidth/Height instead. With SetWidth/Height, the cursor issue seems to not be present, but that opens other issues, and from my simple understanding of things, setScale is really what I should be using anyway.

I have spent a bit of time looking at existing map addons, testing fragments of their code to see if I get the expected behaviour, but I am not. I feel this should be a fairly simple thing to solve, I am just missing some piece of knowledge of the relationship between the WorldMapFrame and the ScrollContainer/other children. But maybe I'm far of?

Before anyone suggests it, no I don't want to just use an existing map addon. I am interested in understanding how this all ties together for educational purposes.

Is anyone able to explain how these things are fitted together, and how one is meant to scale it?

Edit: Forgot to mention I am testing this on the WoW Classic Beta, and there are differences between the 8.x WorldMapFrame and the Classic WorldMapFrame, but I don' think there is anything that should be different for simple scaling of the map frame.

Last edited by gemt : 06-01-19 at 11:32 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Understanding how to correctly scale the WorldMapFrame

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