![Цитата](images/wow-circle/misc/quote_icon.png)
Сообщение от
Hotkey
Такой вопрос нескромный, а куда это зарядить, чтоб работало?
Немного исправил.
https://disk.yandex.ru/d/_T0vSZZsvFLu0Q
Для настройки расположения надо открыть файл RaidWarningFrame.lua и установить нужные координаты и размер.
По умолчанию, будет располагаться вверху экрана.
Код:
local config = {
position = {"TOP", UIParent, "TOP", 0, -50}, -- расположение
scale = 1, -- масштаб
}
local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_ENTERING_WORLD" then
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
RaidWarningFrame:ClearAllPoints()
RaidWarningFrame:SetPoint(unpack(config.position))
RaidWarningFrame:SetScale(config.scale)
hooksecurefunc(RaidWarningFrame, "SetPoint", function(self, point, relativeTo, relativePoint, x, y)
local expected = config.position
if point == expected[1] and relativeTo == expected[2] and relativePoint == expected[3] and x == expected[4] and y == expected[5] then
return
end
self:ClearAllPoints()
self:SetPoint(unpack(config.position))
end)
hooksecurefunc(RaidWarningFrame, "SetScale", function(self, scale)
if scale ~= config.scale then
self:SetScale(config.scale)
end
end)
end
end)