LUA Halp with code removed in 9.x.x
Hi,
I'm having some trouble tracking down what code was changed to to try and fix an addon, the removed code was from this subset Frame:GetBackdrop Frame:GetBackdropBorderColor Frame:GetBackdropColor Frame:SetBackdrop Frame:SetBackdropBorderColor Frame:SetBackdropColor The code in the addon (YSSDROP, for reference) is frame:SetBackdrop(GameTooltip:GetBackdrop()) frame:SetBackdropBorderColor(GameTooltip:GetBackdropBorderColor()) frame:SetBackdropColor(GameTooltip:GetBackdropColor()) frame:SetScale(GameTooltip:GetScale()) my question is: what do I need to change it to to get it working? I've tried the option of NineSlice and that didn't help, there's scant information on what the set/getbackdrop code was changed to, any experts that can shed some light? TYIA |
Either of these two:
1. At frame creation:https://github.com/Stanzilla/WoWUIBu...system-changes2. Just before any backdrop method usage: |
Hiya, thanks for the feedback, the entire code of the section in question is
local function PrepareTooltip(frame, cell) if frame == YssTooltip then frame.YssDrop_OnLeave = frame:GetScript("OnLeave") frame:EnableMouse(true) frame:SetScript("OnLeave", GT_OnLeave) -- copy look and scale of GameTooltip to keep things consistent frame:SetBackdrop(_G.GameTooltip:GetBackdrop()) frame:SetBackdropBorderColor(GameTooltip:GetBackdropBorderColor()) frame:SetBackdropColor(GameTooltip:GetBackdropColor()) frame:SetScale(GameTooltip:GetScale()) end frame:SetOwner(cell, "ANCHOR_NONE") frame:ClearAllPoints() local a1, a2 = GetAnchors(cell) frame:SetPoint(a1, cell, a2) end I modified (based my reading of your comment) per below but getting an error message about line 61 (set owner) so clearly haven't got it in the right place :( local function PrepareTooltip(frame, cell) local frame = CreateFrame("frame", "frameName" or nil, frameParent or nil, "BackdropTemplate") if frame == YssTooltip then frame.YssDrop_OnLeave = frame:GetScript("OnLeave") frame:EnableMouse(true) frame:SetScript("OnLeave", GT_OnLeave) -- copy look and scale of GameTooltip to keep things consistent if not frame.SetBackdrop then Mixin(frame,BackdropTemplateMixin) end frame:SetBackdrop(_G.GameTooltip:GetBackdrop()) frame:SetBackdropBorderColor(GameTooltip:GetBackdropBorderColor()) frame:SetBackdropColor(GameTooltip:GetBackdropColor()) frame:SetScale(GameTooltip:GetScale()) end frame:SetOwner(cell, "ANCHOR_NONE") frame:ClearAllPoints() local a1, a2 = GetAnchors(cell) frame:SetPoint(a1, cell, a2) end |
Don't do both. There is no frame creation in the code you provided so remove the local frame = CreateFrame line you added.
|
I did that and now get a totally new error message
3x StatusBar:GetPoint(): Action[FrameMeasurement] failed because[Can't measure restricted regions]: attempted from: StatusBar:GetPoint(). [string "=[C]"]: in function `GetPoint' [string "@Interface/AddOns/YssDrop/YssDrop.lua"]:146: in function `_OnEnter_func' [string "@Interface/AddOns/Decursive/Libs/LibQTip-1.0-49/LibQTip-1.0.lua"]:1357: in function <...ce/AddOns/Decursive/Libs/LibQTip-1.0/LibQTip-1.0.lua:1351> Locals: (*temporary) = StatusBar { 0 = <userdata> spark = Texture { } AnimGroup = AnimationGroup { } highlight = Texture { } orig_Hide = <function> defined =[C]:-1 Hide = <function> defined @Interface/AddOns/Kui_Nameplates_Core/create.lua:93 orig_SetStatusBarColor = <function> defined =[C]:-1 orig_Show = <function> defined =[C]:-1 SetStatusBarColor = <function> defined @Interface/AddOns/Kui_Nameplates_Core/create.lua:78 Show = <function> defined @Interface/AddOns/Kui_Nameplates_Core/create.lua:89 bg = Texture { } fill = Texture { } } I'm starting to think I might have to give up on this one :( |
All times are GMT -6. The time now is 04:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI