mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 21:50:00 +00:00
core: replace remaining getglobals in favor of _G
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user