Modifying Alertframes
It seems like Alertframes (for example achievement) no longer have names but are children of UiParent?
AchievementAlertSystem:AddAlert(...) calls the alert frame (/run AchievementAlertSystem:AddAlert(112) to test). How can i now easily access them without having to scan for children of UiParent? (It's the same for all alerts, all names are gone :() |
If you look at the source you'll see that the achievement alerts are created using a queued subsystem with
Code:
AchievementAlertSystem = AlertFrame:AddQueuedAlertFrameSubSystem("AchievementAlertFrameTemplate", AchievementAlertFrame_SetUp, 2, 6); Code:
function AlertFrameQueueMixin:OnLoad(alertFrameTemplate, setUpFunction, maxAlerts, maxQueue) The frame pool has some functions that may be relevant to you. Primarily EnumerateActive() that you can use in an a loop to go through all the alerts that are being displayed currently. For example: Code:
local achievementAlertPool = AchievementAlertSystem.alertFramePool |
Thank you for your response, I will try to work through this tomorrow, I cant make much sense of it as of right now :D
|
The frames won't be created until they're needed, so it may be sufficient to just hook the setup function AchievementAlertFrame_SetUp and adjust it there.
|
Quote:
Lua Code:
I do not know if it's the best method, but it works just fine :). I tried hooking the setup function, but the hook did not seem to fire. |
I am done with the alertframe now. It was pretty stright forward after your help :)
Here are some /run commands to test most alertframes incase somebody needs them. Lua Code:
|
All times are GMT -6. The time now is 06:34 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI