I could not believe it and tried my self and you are right.
Checked which dialog it is that is shown there, via using merTorchbug or zgoo's /tbm (/tbug mouse) or /zgoo mouse above the dialog.
It may be necessary to remove the modal overlay so you are able to use the mouse properly there.
It should be :
/script ZO_Dialog1ModalUnderlay:SetHidden(true)
This "Are you sure you want to destroy..." dialog uses the string constant 5224 which is SI_DESTROY_ALL_JUNK
and is used in the dialog as mainText
Code:
ESO_Dialogs["DESTROY_ALL_JUNK"] =
{
title =
{
text = SI_PROMPT_TITLE_DESTROY_ITEMS,
},
mainText =
{
text = SI_DESTROY_ALL_JUNK,
},
buttons =
{
[1] =
{
text = SI_DESTROY_ALL_JUNK_CONFIRM,
callback = DestroyAllJunk,
clickSound = SOUNDS.INVENTORY_DESTROY_JUNK,
},
[2] =
{
text = SI_DIALOG_DECLINE,
},
},
}
The function seems to be used in there yes.
I've added my own prehook in an addon at event_add_on_loaded:
Code:
ZO_PreHook("DestroyAllJunk", function()
d("DestroyAllJunk -> Aborting now")
return true
end)
And If I use the keybind to open the dialog and click on the "ok" button or use the keybind of that button it shows in my chat:
nothing and it just destroys it as you said.
So yeah, seems to be either a bug or a feature
I've asked ZOsDanBatson if he knows whats going on here.
For now you can fix this by "overwriting" the acceptCallback function of that dialog with your own func which does the checks and then calls DestroyAllJunk I'd say.
At event_player_activated do once:
Lua Code:
ESO_Dialogs["DESTROY_ALL_JUNK"] =
{
title =
{
text = SI_PROMPT_TITLE_DESTROY_ITEMS,
},
mainText =
{
text = SI_DESTROY_ALL_JUNK,
},
buttons =
{
[1] =
{
text = SI_DESTROY_ALL_JUNK_CONFIRM,
callback = function()
if not yourAddon.doNotDestroyAllJunk then
DestroyAllJunk()
else
--Do other stuff or just let the dialog close
end
end,
clickSound = SOUNDS.INVENTORY_DESTROY_JUNK,
},
[2] =
{
text = SI_DIALOG_DECLINE,
},
},
}