Hey,
There is a new API to create center screen announcements. This is how I use it in my Thieves Troves Marker addon:
Lua Code:
local params = CENTER_SCREEN_ANNOUNCE:CreateMessageParams(CSA_CATEGORY_LARGE_TEXT, SOUNDS.ACHIEVEMENT_AWARDED)
params:SetCSAType(CENTER_SCREEN_ANNOUNCE_TYPE_POI_DISCOVERED)
params:SetText(GetString(HARVENS_THIEVES_TROVE_DISCOVERED))
CENTER_SCREEN_ANNOUNCE:AddMessageWithParams(params)
List of categories:
Lua Code:
CSA_CATEGORY_SMALL_TEXT = 1
CSA_CATEGORY_LARGE_TEXT = 2
CSA_CATEGORY_NO_TEXT = 3
CSA_CATEGORY_RAID_COMPLETE_TEXT = 4
CSA_CATEGORY_MAJOR_TEXT = 5
CSA_CATEGORY_COUNTDOWN_TEXT = 6
List of SCATypes is in the doc attached in this post:
https://forums.elderscrollsonline.co...change-log-pts
Here are useful CENTER_SCREEN_ANNOUNCE public functions:
Lua Code:
CreateBarParams(...)
CreateMessageParams(category, sound) --this returs an object of type ZO_CenterScreenMessageParams
ReleaseMessageParams(messageParams)
CanDisplayMessage(category)
AddMessage(eventId, category, ...) --this is the legacy function
AddMessageWithParams(messageParams)
QueueMessage(messageParams)
DisplayMessage(messageParams)
ZO_CenterScreenMessageParams functions:
Lua Code:
Reset()
SetSound(sound)
GetSound()
SetText(mainText, secondaryText)
GetMainText()
GetSecondaryText()
SetIconData(icon, iconBg)
GetIconData()
SetExpiringCallback(callback)
GetExpiringCallback()
SetBarParams(barParams)
GetBarParams()
SetLifespanMS(lifespanMS)
GetLifespanMS()
MarkSuppressIconFrame()
GetSuppressIconFrame()
MarkQueueImmediately(reinsertStompedMessage)
GetQueueImmediately()
MarkShowImmediately()
GetShowImmediately()
GetMostUniqueMessage()
SetCategory(category)
GetCategory()
SetObjectPoolKey(key)
SetCSAType(csaType)
GetCSAType()
SetPriority(priority)
GetPriority()
SetQueuedOrder(queuedOrder)
GetQueuedOrder()
SetEndOfRaidData(endOfRaidData)
GetEndOfRaidData()
CallExpiringCallback()
PlaySound()
ConvertOldParams(sound, message, combinedMessage, icon, iconBg, expiringCallback, barParams, lifespan, suppressFrame, queueImmediately, showImmediately, reinsertStompedMessage)
You can also add your types with priorities with this function:
Lua Code:
ZO_CenterScreenAnnounce_SetPriority(csaType, priority)
Hope this will be useful