WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Tooltip and Constants (https://www.wowinterface.com/forums/showthread.php?t=56222)

VincentSDSH 05-16-18 04:30 AM

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.

Background:
In FrameXML/ContainerFrame.lua are the following lines:
Lua Code:
  1. CONTAINER_OFFSET_Y = 70;
  2. CONTAINER_OFFSET_X = 0;
  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");
  3.     tooltip:SetPoint("BOTTOMRIGHT", "UIParent", "BOTTOMRIGHT", -CONTAINER_OFFSET_X - 13, CONTAINER_OFFSET_Y);
  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.

siweia 05-16-18 11:23 AM

Did you check in all the default ui codes yet?

VincentSDSH 05-16-18 06:18 PM

I keep an current export of the blizzard UI code and did a global find for the constants I mentioned. I only saw _X and _Y set once, in the file I mentioned with as-constant values. I didn't see them reset anywhere.

Rilgamon 05-17-18 05:49 AM

Wasnt there an automatic shifting to the left when you enabled the actionbars at the right side? Perhaps an old cvar active?

VincentSDSH 05-17-18 07:23 AM

Yes, there is a shift-left when those are enabled. I use Dominos so I never see the right-side bars and :eek: I could have sworn they were all disabled. Are the on by default now and I missed that? Anyway, that's the hidden _X modifier variance.

I knew about that but because I'm getting both X and Y shifts, I (foolishly) discounted it as a possible cause, and it turns out it is only affecting the _X, not the _Y, which retains its strange deviations.

Instead of _Y=70, I'm getting 85 or 94. I've been through the interface settings and they're the same across the chars I checked (and all special action-button bars disabled). I could accept that 70 is the base and something or other gets tacked onto that, the question is what?


All times are GMT -6. The time now is 09:35 PM.

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