[Feature Request] Ability to hide chat panels in pet battle
leemitchell25 opened this issue ยท 6 comments
Hi there,
Recently changed my ElvUI and the chat panel placement now interferes with the Pet Battle UI. Noticed that Shadow & Light can hide the panels in combat so I figured out a way to have it also hide them in pet battles. I think it would be great if this was implemented in future versions of Shadow & Light for other users.
The modifications I made are as follows.
In defaults\profile.lua add the following code under line 294:
["petbattlehide"] = "NONE",
In modules\chat\chat.lua in function C:Initialize add the following after the --Combat Hide code:
--PetBattle Hide
self:RegisterEvent('PET_BATTLE_OPENING_START', 'PetBattle')
self:RegisterEvent('PET_BATTLE_CLOSE', 'PetBattle')
In modules\chat\chat.lua add the following function after the C:Combat(event) function:
function C:PetBattle(event)
if event == 'PET_BATTLE_OPENING_START' then
if E.db.sle.chat.petbattlehide == 'BOTH' or E.db.sle.chat.petbattlehide == 'RIGHT' then
RightChatPanel:Hide()
RightChatToggleButton:Hide()
end
if E.db.sle.chat.petbattlehide == 'BOTH' or E.db.sle.chat.petbattlehide == 'LEFT' then
LeftChatPanel:Hide()
LeftChatToggleButton:Hide()
end
elseif event == 'PET_BATTLE_CLOSE' then
if not RightChatPanel:IsShown() then
RightChatPanel:Show()
RightChatToggleButton:Show()
end
if not LeftChatPanel:IsShown() then
LeftChatPanel:Show()
LeftChatToggleButton:Show()
end
end
end
In option\chat\chat_c.lua in function configTable() add the following code after the combathide options:
petbattlehide = {
order = 10, type = "select",
name = L["Hide In Pet Battle"],
get = function(info) return E.db.sle.chat.petbattlehide end,
set = function(info, value) E.db.sle.chat.petbattlehide = value end,
values = {
["NONE"] = NONE,
["BOTH"] = L["Both"],
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
}
},
And finally, in option\chat\chat_c.lua in function configTable() change the order for the setupDelay options from 10 to 11.
Thank you for all your hard work on Shadow & Light. It's an awesome addition to ElvUI. :)
Also the RMBA interface next to the minimap stays open in a pet battle when it shouldn't
Also the RMBA interface next to the minimap stays open in a pet battle when it shouldn't
The what? I don't pet battle other than to test something specific to it.
Ah, sorry I guess it's not always the same letters. There are 4 letter buttons that I'm not sure what all of them do, but they persist during pet battles, when all UI elements are supposed to hide. Here it is CASR, and the number is the addons list button.
u can use the visibility section to hide them during petbattle, put [petbattle] hide; show