Thread Tools Display Modes
05-16-18, 04:30 AM   #1
VincentSDSH
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.

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.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-16-18, 11:23 AM   #2
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Did you check in all the default ui codes yet?
  Reply With Quote
05-16-18, 06:18 PM   #3
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
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.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
05-17-18, 05:49 AM   #4
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Wasnt there an automatic shifting to the left when you enabled the actionbars at the right side? Perhaps an old cvar active?
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-17-18, 07:23 AM   #5
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Yes, there is a shift-left when those are enabled. I use Dominos so I never see the right-side bars and 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?
__________________
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