Auto-closing Wowhead URL window after copying
Iowerth opened this issue · 8 comments
Requested feature described in title.
It is implemented in addon Leatrix Plus for items, etc. Very convenient.
@Dyaxler it doesn't auto-closes after copying. v8.6.0
I think I may have closed this by accident. I never looked at how Leatrix Plus was doing this.
As far as Blizzards Popup Templates... there isn't an option to close it via a CTRL + C programmatically. Only ESC and a button click on the Close button does. I'll have to see how Leatrix got around that...
I never looked at how Leatrix Plus was doing this
Seems like this:
eFrame.b:SetScript("OnKeyDown", function(void, key)
if key == "C" and IsControlKeyDown() then
C_Timer.After(0.1, function()
eFrame:Hide()
ActionStatus_DisplayMessage(L["Copied to clipboard."], true)
if LeaPlusLC.FactoryEditBoxFocusChat then
local eBox = ChatEdit_ChooseBoxForSend()
ChatEdit_ActivateChat(eBox)
end
end)
end
end)
Yep... I thought as much. That's kind of a hack but I think I can duplicate that in Questie for our purposes.
Just downloaded and reviewed Leatrix Plus. This is not the same feature. Leatrix Plus allows you to evoke a custom Edit Box prepopulated with a WoW Head URL. This custom edit box has a custom Script Handler that when CTRL + C is pressed, it essentially copies it to the system clipboard and closes the custom Edit Box.
Questie evokes the Blizzard API StaticPopupDialogs for our WoW Head URL's. This API doesn't provide us an "Out of Box" function to do the same thing Leatrix Plus is doing. However, this gives me an idea... I might just write my OWN handlers similar to the way Leatrix does it instead of using StaticPopupDialogs.
@Iowerth @MyTechnoHunter this was a LOT easier than I thought. I wasn't aware that I could manipulate Blizzards StaticPopupDialogs and insert a custom SetScript like this until I tried it. Works perfectly.