I have moved alert text notifications from the top right corner to the top left corner (using the
Azurah addon). With the default alignment to the right it looks just weird, so this is my solution how to change alignment:
(just copy&paste the code to the end of any .lua file in your addons folder)
Lua Code:
EVENT_MANAGER:RegisterForEvent("Modify_AlertTextNotification", EVENT_ADD_ON_LOADED,
function(eventCode, addon)
if (addon):find("^ZO_") then return end --run this code after default UI is loaded
local line = ZO_AlertTextNotification:GetChild(1)
if not line then
ZO_Alert(UI_ALERT_CATEGORY_ALERT, nil, " ")
line = ZO_AlertTextNotification:GetChild(1)
end
line.fadingControlBuffer.anchor = TOPLEFT
function line.fadingControlBuffer.templates.ZO_AlertLine.setupFunction(control, category, message, color, soundId)
control:SetWidth(ZO_Compass:GetLeft() - GuiRoot:GetLeft() - 40)
control:SetText(message)
control:SetColor(color:UnpackRGBA())
control:SetHorizontalAlignment(TEXT_ALIGN_LEFT)
ZO_SoundAlert(category, soundId)
end
EVENT_MANAGER:UnregisterForEvent("Modify_AlertTextNotification", eventCode)
end)