Tooltip and Constants - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-16-18, 04:30 AM   #1
Non-Canadian Luzer!
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Tooltip and Constants

I'm seeing a very strange issue with tooltip location and it doesn't seem to be an addon that's doing it.

In FrameXML/ContainerFrame.lua are the following lines:
Lua Code:
  3. CONTAINER_SCALE = 0.75;

In FrameXML/GameTooltip.lua is the following:
Lua Code:
  1. function GameTooltip_SetDefaultAnchor(tooltip, parent)
  2.     tooltip:SetOwner(parent, "ANCHOR_NONE");
  4.     tooltip.default = 1;
  5. end

This should position the tooltip point at -13, 70...but it never seems to be.

This is where it gets weird.

If I dump these constants, they aren't 0 and 70 respectively. In fact they are different for different characters (with some duplicates that seem to be isolated to server but I have low confidence that means anything). They are always near that area but a difference of 30pixels is still odd since it shouldn't change at all.

I've checked every addon and library and none change this constant -- this happens in the base UI with no addons.

I thought I'd just set them back to the defaults and be done with it but they change at least twice during load, so change after the end of my :OnEnable() function. I got cleaver and delayed resetting them for 2 seconds and that seemed to work but within a minute they were changed again.

This behavior also happens in the base UI, setting and dumping the not-quite-constants via /script and /dump commands.

I'm wondering if there is something, maybe at the C level, that can modify those under some condition or other, or some scaling thing that affects them (I didn't find any in the Lua but maybe I missed it).

This is only a problem in one tiny area of my UI and it's easily worked-around by resetting the constants back to default before I do what I need to do so this is more informational than anything.
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Tooltip and Constants

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