Leatrix Plus (The War Within)

Leatrix Plus (The War Within)

31M Downloads

[Feature Request] Give the "Train All" button a name

glassleo opened this issue ยท 3 comments

commented

I realize this is probably very niche, but I used to use another addon to add a Train All button to my profession trainers before it broke in 10.0.2. I also use the addon DialogKey, which lets me keybind most buttons in the game rather than having to click on stuff. I used to add the Train All button to DialogKey (/dk add) so that I could just hit space to train all skills.

The Leatrix button works great, however it seems like you have not given the Train All button a name. This means that other addons such as DialogKey cannot detect it.

Any chance you could give it a global name?

commented

In 10.0.28.alpha.3, the train all button has a global name of LeaPlusGlobalTrainAllButton. It will be added to the next alpha releases of Leatrix Plus for Wrath of the Lich King Classic and Classic Era.

Typically, frames are not given global names in Leatrix addons but they are sometimes added if someone requests it.

There are ways of accessing a local frame though. You can do something like this to hide the train all button from another addon without having access to a global name:

for i, child in ipairs({ClassTrainerFrame:GetChildren()}) do
	if child:GetObjectType() == "Button" and child:GetText() == "Train All" then -- Note that the text may be localised
		child:Hide() -- Hide the train all button
	end
end

This has to run after Blizzard_TrainerUI has loaded.

commented

Thank you so much!

commented

I installed 10.0.28.alpha.3 and added LeaPlusGlobalTrainAllButton to DialogKey and it's working great. Thank you so much again! This makes my life a lot easier.