View Single Post
10/19/23, 11:35 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,999
I think you can add a disabled or visible=function()...end to the buttons,but I'm not sure any more. Maybe it was at the keybind only.

If this does not exist or work you need to manually update the buttons visibility. And make the callback func do nothing if one uses the keybind. I think I had done this in an addon, not sure where anymore though.
Maybe it was the FCO ItemSaver anti-destroy protection at the destroy dialog. It hides the accept/ok button if an item is protected.

But as each dialog reuses the same controls make sure to reebable and show the buttons again on dialog close so the next dialog properly shows them again!


Another idea is to check ZOs code at the destroy dialog where you need to enter a special text to allow the destroying. Maybe you can turn it around somehow to disallow or only allow if the entered text is not in a list already

https://github.com/esoui/esoui/blob/...alogs.lua#L204

It's using "matchingString = " to compare the text.
Which will be passed to:
https://github.com/esoui/esoui/blob/...ialog.lua#L698

Which is an editbox of type ZO_RequiredTextFields:
https://github.com/esoui/esoui/blob/...lates.lua#L200

Maybe you can define your own editBox of a similar type which checks your table then, and create a custom dialog using your own editbox type?

Last edited by Baertram : 10/20/23 at 05:11 AM.
  Reply With Quote