PHP код:
do
local a,_,class,mh,oh,rs,as,b = CreateFrame('frame',"FloatingButtonsWeapons"),UnitClass("player")
a:SetPoint('CENTER')
a:SetSize(127,45.5)
a:SetMovable(true);a:SetClampedToScreen(true);a:EnableMouse(true)
a:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 0, edgeSize = 1, insets = { left = 0, right = 0, top = 0, bottom = 0}})
a:SetBackdropColor(.4,.4,.4,1)
a:SetBackdropBorderColor(0,0,0,1)
a:SetScript("OnMouseDown",function(self,button) self:StartMoving() end)
a:SetScript("OnMouseUp",function(self,button) self:StopMovingOrSizing() end)
a:SetScale(.8)
a:Hide()
mh = CreateFrame("Button","CHaracterMainHandSlot",a,"PaperDollItemSlotButtonTemplate")
mh:SetPoint('TOPLEFT',a,'TOPLEFT',4,-4);mh:SetID(16)
oh = CreateFrame("Button","CHaracterSecondaryHandSlot",a,"PaperDollItemSlotButtonTemplate")
oh:SetPoint('TOPLEFT',mh,"TOPRIGHT",4,0);oh:SetID(17)
rs = CreateFrame("Button","CHaracterRangedSlot",a,"PaperDollItemSlotButtonTemplate")
rs:SetPoint('TOPLEFT',oh,"TOPRIGHT",4,0);rs:SetID(18)
if class == "HUNTER" or class == "ROGUE" or class == "WARRIOR" then
as = CreateFrame("Button","CHaracterAmmoSlot",a,"PaperDollItemSlotButtonTemplate")
as:SetSize(27,27);as:SetPoint("LEFT",rs,"RIGHT",4,0);as:SetID(0)
CHaracterAmmoSlotCount:SetFont("Fonts\\ARIALN.TTF",9,"OUTLINE")
CHaracterAmmoSlotCount:SetPoint("BOTTOMRIGHT")
CHaracterAmmoSlotNormalTexture:SetSize(48,48)
a:SetWidth(158.5)
end
PaperDollFrameItemFlyout:SetParent(UIParent)
hooksecurefunc("SetItemButtonTexture",function(self)
if self == mh or self == oh or self == rs then
local link = GetInventoryItemLink("player",self:GetID())
if link then _G[self:GetName().."IconTexture"]:SetTexture((select(10,GetItemInfo(link)))) end
end
end)
b = CreateFrame("Button","FloatingButtonsWeaponsButton",PaperDollFrame)
b:SetPoint('BOTTOMLEFT',CharacterRangedSlot,'BOTTOMRIGHT',76,-6)
b:SetSize(24,24)
local t = b:CreateFontString(nil,"OVERLAY")
t:SetFont("Fonts\\ARIALN.TTF",13,"OUTLINE")
t:SetTextColor(0,.8,1,1)
t:SetText("F")
t:SetPoint("CENTER", 1, 0)
b:SetScript("OnMouseDown", function() if a:IsShown() then a:Hide() t:SetTextColor(.8,.3,.3,1) else a:Show() t:SetTextColor(0,.8,1,1) end end)
end
главная кнопка вкл/выкл в правом нижнем углу окна "Информация о персонаже", "F".