local _G=_G
local DB = {}
local frame = CreateFrame("Frame")
size = CreateFrame("Slider", "size", UIParent, "OptionsSliderTemplate")
size:SetWidth(400)
size:SetHeight(30)
size:SetOrientation("HORIZONTAL")
size:SetPoint("CENTER")
size:SetMinMaxValues(0.1,3)
size:SetValueStep(0.01)
local function update()
for _,frame in next, {MainMenuBar, MultiBarBottomLeft, MultiBarBottomRight, MultiBarLeft, MultiBarRight } do frame:SetScale(resizerDB.value) end
end
size:SetScript("OnValueChanged", function()
resizerDB.value = size:GetValue()
print("Тык /scale ,что бы показать фрейму")
print("Масштаб панелей = "..size:GetValue())
update()
end)
local hide = true
local function hide()
if(hide) then
size:Hide()
else
size:Show()
end
hide = not hide
end
_G.SlashCmdList['SCALE'] = hide
_G.SLASH_SCALE1 = '/scale'
frame.ADDON_LOADED = function(self)
if(_G.resizerDB) then
DB = _G.resizerDB
value = resizerDB.value
size:SetValue(value)
for _,frame in next, {MainMenuBar, MultiBarBottomLeft, MultiBarBottomRight, MultiBarLeft, MultiBarRight } do frame:SetScale(resizerDB.value) end
else
_G.resizerDB = DB
end
end
hide()
frame:SetScript("OnEvent",function(self,event,...) self[event](self,event,...) end)
frame:RegisterEvent("ADDON_LOADED")
[свернуть]