core: replace remaining getglobals in favor of _G

This commit is contained in:
shagu
2019-04-06 14:30:31 +02:00
parent 85975eaee1
commit d7c64d7d0a
8 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -833,7 +833,7 @@ function pfUI.api.BarButtonAnchor(button,basename,buttonindex,barsize,formfactor
button._anchor = {"TOPLEFT", parent, "TOPLEFT", bordersize+padding, -bordersize-padding}
else
local col = buttonindex-((math.ceil(buttonindex/cols)-1)*cols)
button._anchor = col==1 and {"TOP",getglobal(basename..(buttonindex-cols)),"BOTTOM",0,-(bordersize*2+padding)} or {"LEFT",getglobal(basename..(buttonindex-1)),"RIGHT",(bordersize*2+padding),0}
button._anchor = col==1 and {"TOP",_G[basename..(buttonindex-cols)],"BOTTOM",0,-(bordersize*2+padding)} or {"LEFT",_G[basename..(buttonindex-1)],"RIGHT",(bordersize*2+padding),0}
end
return button._anchor
end
+2 -2
View File
@@ -272,7 +272,7 @@ end
-- 'icon' [texture] the button icon that should be skinned.
-- 'disableHighlight' [bool] disable mouseover highlight.
function pfUI.api.SkinButton(button, cr, cg, cb, icon, disableHighlight)
local b = getglobal(button)
local b = _G[button]
if not b then b = button end
if not b then return end
if not cr or not cg or not cb then
@@ -312,7 +312,7 @@ end
-- Applies pfUI skin to collapse/expand buttons:
-- 'button' [frame/string] the button that should be skinned.
function pfUI.api.SkinCollapseButton(button, all)
local b = getglobal(button)
local b = _G[button]
if not b then b = button end
if not b then return end
+2 -2
View File
@@ -1522,11 +1522,11 @@ function pfUI.uf:ClickAction(button)
elseif label == "pet" then
ToggleDropDownMenu(1, nil, PetFrameDropDown, "cursor")
elseif label == "party" then
ToggleDropDownMenu(1, nil, getglobal("PartyMemberFrame" .. this.id .. "DropDown"), "cursor")
ToggleDropDownMenu(1, nil, _G["PartyMemberFrame" .. this.id .. "DropDown"], "cursor")
elseif label == "raid" then
local name = this.lastUnit
FriendsDropDown.displayMode = "MENU"
FriendsDropDown.initialize = function() UnitPopup_ShowMenu(getglobal(UIDROPDOWNMENU_OPEN_MENU), "PARTY", unitstr, name, id) end
FriendsDropDown.initialize = function() UnitPopup_ShowMenu(_G[UIDROPDOWNMENU_OPEN_MENU], "PARTY", unitstr, name, id) end
ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor")
end
else