This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello!
As documented here, the GetMouseFocus will be replaced by GetMouseFoci in TWW but it works a little different.
On TWW test servers, the usage of GetMouseFocus causes null errors.
Here is the fix found by Kharthus on the addon ItemRack.
if tocversion >= 110000 then local region = GetMouseFoci() local frame = region[1] else local frame = GetMouseFocus() end
Regards :)
I suggest this fix on line 118 of LibUIDropDownMenu.lua but I cannot test it as the test servers are down at the moment.
function lib:UIDropDownMenuButton_ShouldShowIconTooltip(self) if self.Icon and (self.iconTooltipTitle or self.iconTooltipText) and (self.icon or self.mouseOverIcon) then if wowversion >= 110000 then local region = GetMouseFoci() local frame = region[1] else local frame = GetMouseFocus() end return frame == self.Icon; end return false; end
PTR still not open in my region. Unable to test the fix :/
Servers are up.
I replace tocversion by wowversion above ;)
Now that Classic also use GetMouseFoci, I changed the code to:
function lib:UIDropDownMenuButton_ShouldShowIconTooltip(self) if self.Icon and (self.iconTooltipTitle or self.iconTooltipText) and (self.icon or self.mouseOverIcon) then if GetMouseFoci then local region = GetMouseFoci() local frame = region[1] else local frame = GetMouseFocus() end return frame == self.Icon; end return false; end
Sorry for my super-late response. I was away for quite a while.
Looking at this issue again, I guess it's no longer a concern.GetMouseFoci now supports in all game client, but also, as instructed in API page here: https://warcraft.wiki.gg/wiki/API:GetMouseFoci
For the common case of simply testing if a region has mouse focus, consider using ScriptRegion:IsMouseMotionFocus().
And the current release has migrated to use codes like below:
function lib:UIDropDownMenuButton_ShouldShowIconTooltip(self) if self.Icon and (self.iconTooltipTitle or self.iconTooltipText) and (self.icon or self.mouseOverIcon) then return self.Icon:IsMouseMotionFocus(); end return false; end
Thanks again for trying to reach out to me and drawing for my attention.
To post a comment, please login or register a new account.