WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Double-click to sign up for a group in the Premade Groups finder (https://www.wowinterface.com/forums/showthread.php?t=54201)

kingnothing7 08-12-16 03:27 PM

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.

Phanx 08-12-16 08:12 PM

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.

kingnothing7 08-13-16 12:31 AM

Quote:

Originally Posted by Phanx (Post 317872)
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! :)

SlimShady1805 05-10-20 06:34 PM

Quote:

Originally Posted by Phanx (Post 317872)
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.

Kanegasi 05-10-20 11:06 PM

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.

SlimShady1805 05-12-20 09:12 AM

I probably did something wrong, but I have no clue where the mistake was.

Kanegasi 05-12-20 09:18 AM

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.

SlimShady1805 05-13-20 07:55 AM

Quote:

Originally Posted by Kanegasi (Post 335903)
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

Kanegasi 05-13-20 08:28 AM

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

Sideshow 09-10-20 03:55 PM

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?

Kanegasi 09-10-20 04:49 PM

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)

Sideshow 09-11-20 03:29 AM

Quote:

Originally Posted by Kanegasi (Post 336821)
Register for ADDON_LOADED so you can execute the code when the talent UI loads

How wonderful. Thank you

chrus 11-05-22 08:07 AM

Anyone know what this line "LFGListFrame.SearchPanel.ScrollFrame.buttons" needs to be changed to, to make this continue to work?

SearchPanel no longer contain ScrollFrame, but I can't find what it has been replaced by.
The alternative, "LFGListFrame.SearchPanel.selectedResult" also has been removed.

I can't seem to find any good documentation about the XML frames in the game, so I can't fix it myself.


All times are GMT -6. The time now is 08:49 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI