Quantcast
Double-click to sign up for a group in the Premade Groups finder - WoWInterface
 
Thread Tools Display Modes
08-12-16, 03:27 PM   #1
kingnothing7
A Deviate Faerie Dragon
Join Date: Aug 2016
Posts: 11
Double-click to sign up for a group in the Premade Groups finder

Pretty simple idea here. In the Premade Groups finder (hotkey I), I would like to be able to sign up for groups simply by double-clicking them. This would be faster than the current way it works (clicking it to highlight it, then clicking the "sign up" button at the bottom). This would very handy when trying to join groups which fill up very, very quickly.

Any help would be much appreciated.

Last edited by kingnothing7 : 08-12-16 at 03:40 PM.
  Reply With Quote
08-12-16, 08:12 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This will probably work:

Code:
local function OnDoubleClick(self, button)
    LFGListSearchPanel_SignUp(self:GetParent():GetParent():GetParent())
end

for _, button in pairs(LFGListFrame.SearchPanel.ScrollFrame.buttons) do
    button:SetScript("OnDoubleClick", OnDoubleClick)
end
You can use http://addon.bool.no/ to turn it into an addon.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote
08-13-16, 12:31 AM   #3
kingnothing7
A Deviate Faerie Dragon
Join Date: Aug 2016
Posts: 11
Originally Posted by Phanx View Post
This will probably work:

Code:
local function OnDoubleClick(self, button)
    LFGListSearchPanel_SignUp(self:GetParent():GetParent():GetParent())
end

for _, button in pairs(LFGListFrame.SearchPanel.ScrollFrame.buttons) do
    button:SetScript("OnDoubleClick", OnDoubleClick)
end
You can use http://addon.bool.no/ to turn it into an addon.
Just tried it and it indeed works. Thank you very much!
  Reply With Quote
05-10-20, 06:34 PM   #4
SlimShady1805
A Defias Bandit
Join Date: May 2020
Posts: 3
Originally Posted by Phanx View Post
This will probably work:

Code:
local function OnDoubleClick(self, button)
    LFGListSearchPanel_SignUp(self:GetParent():GetParent():GetParent())
end

for _, button in pairs(LFGListFrame.SearchPanel.ScrollFrame.buttons) do
    button:SetScript("OnDoubleClick", OnDoubleClick)
end
You can use http://addon.bool.no/ to turn it into an addon.
Hi, should it work for 8.3 ?
I did as you said, but it doesnt shows off in the In-Game Addon Folder.
  Reply With Quote
05-10-20, 11:06 PM   #5
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 504
I can confirm the code above still works. Double-clicking on an entry in the finder search window does the same thing as clicking the sign-up button, which brings up the role selection window.
  Reply With Quote
05-12-20, 09:12 AM   #6
SlimShady1805
A Defias Bandit
Join Date: May 2020
Posts: 3
I probably did something wrong, but I have no clue where the mistake was.
  Reply With Quote
05-12-20, 09:18 AM   #7
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 504
Ah, my apologies, I didn't read your post correctly. The code works, but your problem is loading the addon. When you visit that site, you give the addon a name in the top box, paste the provided code in the bigger box, download the zip file, then extract it to your Interface\AddOns folder while WoW is not running. For example, you named the addon "GroupDoubleClick", you should end up with a "GroupDoubleClick" folder in AddOns that has two files in it, one named "GroupDoubleClick" and one named "core". Then, you start WoW back up and will see "GroupDoubleClick" in your addon list.
  Reply With Quote
05-13-20, 07:55 AM   #8
SlimShady1805
A Defias Bandit
Join Date: May 2020
Posts: 3
Originally Posted by Kanegasi View Post
Ah, my apologies, I didn't read your post correctly. The code works, but your problem is loading the addon. When you visit that site, you give the addon a name in the top box, paste the provided code in the bigger box, download the zip file, then extract it to your Interface\AddOns folder while WoW is not running. For example, you named the addon "GroupDoubleClick", you should end up with a "GroupDoubleClick" folder in AddOns that has two files in it, one named "GroupDoubleClick" and one named "core". Then, you start WoW back up and will see "GroupDoubleClick" in your addon list.
Yep, got it.
I think I ended up copying the zip file into my Addon folder last time.
thx
  Reply With Quote
05-13-20, 08:28 AM   #9
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 504
Seeing this thread gave me an idea. For anyone interested, I have adjusted the code to also allow alt+ctrl clicking groups to report advertisements. Much easier to get rid of all the WTS groups.

Lua Code:
  1. for _,b in pairs(LFGListFrame.SearchPanel.ScrollFrame.buttons) do
  2.     b:HookScript("OnDoubleClick",function(s)
  3.         LFGListApplicationDialog_Show(LFGListApplicationDialog,s.resultID)
  4.     end) -- double click to sign up groups
  5.     b:HookScript("PostClick",function(s)
  6.         if IsAltKeyDown() and IsControlKeyDown() then
  7.             C_LFGList.ReportSearchResult(s.resultID,"lfglistspam")
  8.             LFGListSearchPanel_AddFilteredID(LFGListFrame.SearchPanel,s.resultID)
  9.             LFGListSearchPanel_UpdateResultList(LFGListFrame.SearchPanel)
  10.             LFGListSearchPanel_UpdateResults(LFGListFrame.SearchPanel)
  11.         end
  12.     end) -- alt+ctrl click to report ads
  13. end
  Reply With Quote
09-10-20, 03:55 PM   #10
Sideshow
A Flamescale Wyrmkin
 
Sideshow's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 103
Sorry for maybe hacking this thread, but I'm searching for a double click on a specialization button, in the specialization window.

Yes, i'm a programmer and lazy so I really would prefer not having to click on the spec and then on "Activate"

I've come up with some tests like this:

Code:
PlayerTalentFrameSpecializationSpecButton1:SetScript("OnDoubleClick", function () SetSpecialization(1) end)
PlayerTalentFrameSpecializationSpecButton2:SetScript("OnDoubleClick", function () SetSpecialization(2) end)
PlayerTalentFrameSpecializationSpecButton3:SetScript("OnDoubleClick", function () SetSpecialization(3) end)
It works, but not on game load, since PlayerTalentFrame is not created then, but rather when you open it for the first time it seems.
(LFGListFrame IS created on game load, don't know why ...)

Anyone would know a solution maybe?
  Reply With Quote
09-10-20, 04:49 PM   #11
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 504
Register for ADDON_LOADED so you can execute the code when the talent UI loads.

Lua Code:
  1. local f=CreateFrame("frame")
  2. f:RegisterEvent("ADDON_LOADED")
  3. f:SetScript("OnEvent",function(self,event,addon)
  4.     if addon=="Blizzard_TalentUI" then
  5.         PlayerTalentFrameSpecializationSpecButton1:SetScript("OnDoubleClick",function()SetSpecialization(1)end)
  6.         PlayerTalentFrameSpecializationSpecButton2:SetScript("OnDoubleClick",function()SetSpecialization(2)end)
  7.         PlayerTalentFrameSpecializationSpecButton3:SetScript("OnDoubleClick",function()SetSpecialization(3)end)
  8.     end
  9. end)
  Reply With Quote
09-11-20, 03:29 AM   #12
Sideshow
A Flamescale Wyrmkin
 
Sideshow's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 103
Originally Posted by Kanegasi View Post
Register for ADDON_LOADED so you can execute the code when the talent UI loads
How wonderful. Thank you
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Double-click to sign up for a group in the Premade Groups finder

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off