Thread Tools Display Modes
11-02-22, 03:23 PM   #1
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
Question New Portable Button Problems

Hello folks,
I have a small problem that I just can't get any further. Since the Dragonflight update, I can no longer press any buttons in my addon. I've tried pretty much everything I knew, but I just can't do it.
Perhaps one of you can help me to solve the problem. I would be very very grateful.

I uploaded the addon in the attachment.

I think the problem is somewhere in this area in main.lua


Lua Code:
  1. -- Create the Clickable Portable Buttons
  2. function me:CreateUI_Buttons()
  3.     local n
  4.     -- Create each button using a Secure Action template
  5.     for n = 1, me.MAX_BUTTONS do
  6.         local button = "button"..tostring(n)
  7.        
  8.         -- Each "button" is really a Frame with a Button, Texture, and Text
  9.         me.ui[button] = CreateFrame("Frame", "PortableUIButton"..tostring(n), me.ui.container)
  10.         me.ui[button].ID = n
  11.         me.ui[button]:SetScript("OnEnter", function(self, ...)
  12.                 me:DoScript_OnEnter(self, ...)
  13.             end)
  14.         me.ui[button]:SetScript("OnLeave", function(self, ...)
  15.                 me:DoScript_OnLeave(self, ...)
  16.             end)
  17.        
  18.         -- The Secure Action Button
  19.         me.ui[button].sab = CreateFrame("Button", "PortableUIButton"..tostring(n).."SAB", me.ui[button], "SecureActionButtonTemplate")
  20.         me.ui[button].sab:RegisterForClicks("LeftButtonDown", "RightButtonDown")
  21.         me.ui[button].sab:SetScript("OnEnter", function(self, ...)
  22.                 me:DoScript_OnEnter(self, ...)
  23.             end)
  24.         me.ui[button].sab:SetScript("OnLeave", function(self, ...)
  25.                 me:DoScript_OnLeave(self, ...)
  26.             end)
  27.         me.ui[button].sab:HookScript("OnClick", function(self, ...)
  28.                 me:DoScript_OnClick(self, ...)
  29.             end)
  30.         me.ui[button].sab:SetAllPoints(me.ui[button])
  31.        
  32.         -- Disabled Texture (If a mage doesn't know a spell, it will be greyed out)
  33.         me.ui[button].disabled = me.ui[button]:CreateTexture(nil, "ARTWORK")
  34.         me.ui[button].disabled:SetAllPoints(me.ui[button])
  35.        
  36.         -- Text (Shows the name of the destination)
  37.         me.ui[button].text = CreateFrame("Frame", nil, me.ui[button])
  38.         me.ui[button].text:SetAllPoints(me.ui[button])
  39.         me.ui[button].text.name = me.ui[button].text:CreateFontString(nil)
  40.         me.ui[button].text.name:SetFont("Fonts\\ARHei.ttf", 12, "") -- Default font, we don't want a nil font
  41.         me.ui[button].text.name:SetJustifyV("TOP")
  42.     end
  43. end
Attached Files
File Type: zip Portable.v.7.4.zip (2.12 MB, 40 views)
  Reply With Quote
11-02-22, 03:43 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Earlier taint from say edit mode ? I think action buttons having issues are a common side affect after that happening.
__________________
  Reply With Quote
11-02-22, 03:47 PM   #3
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
The editing mode was not used by me. That nothing happens when you click on a teleport is not only with me but with everyone I know.
  Reply With Quote
11-02-22, 07:47 PM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Hmm, let me check my mage portal addon and see if that has similar issues since the expansion.

We are doing things differently so at least if mine works I can point you to that to see what might need changing now in yours.


Okay, mine appear to be working.
I am using xml files to set up frame templates and frames
I am using the secure set up type/spell and Requesting spell data prior to setting up the buttons
And instead of using spell1 and spell2 for left and right clicking I am just using spell and having the teleport and portal buttons separate.
But whether these are why mine are working I don't know.

My addon if you haven't already tracked it down is : https://www.wowinterface.com/downloa...gePortals.html
__________________

Last edited by Xrystal : 11-02-22 at 08:23 PM.
  Reply With Quote
11-02-22, 11:18 PM   #5
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
Hmmm my brain is broken.
  Reply With Quote
11-03-22, 05:35 AM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Hopefully someone else will see something that I am not.
__________________
  Reply With Quote
11-03-22, 05:46 AM   #7
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
I have teste now without all addons only Portable. But nothing.
  Reply With Quote
11-03-22, 08:40 AM   #8
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Okay, went through my addon and replaced all my SetAttribute and GetAttributes to use spell1 instead of spell and added RegisterForClicks and the buttons don't work.

Aha, the RegisterForClicks appears to be the problem. If I remove that line everything works fine.

Removed the line from your main.lua file of Portable and your spell buttons work on left click.

Doesn't solve it full for your addon which relies on the right click option but one step closer.

Also tried with "AnyDown" incase the two button option was an issue but that didn't help either.

Aha .. seems like this might be the problem...

https://github.com/Stanzilla/WoWUIBugs/issues/268

Just testing that theory out

It worked for my addon but not yours .. back to square one .. *very puzzled*

Although based on report https://github.com/Stanzilla/WoWUIBugs/issues/282 this was fixed several patches back..
__________________

Last edited by Xrystal : 11-03-22 at 09:04 AM.
  Reply With Quote
11-03-22, 09:00 AM   #9
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
That's how I feel since the Dragonflight release, I'm at the end of all ideas^^. I have to say that I'm not really a pro in the area of ​​lua either. But I really thank you for your efforts.
  Reply With Quote
11-03-22, 09:05 AM   #10
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
I'm sorry I couldn't help further. If anything springs to mind at a later date and it resolves the issue I'll let you know.
__________________
  Reply With Quote
11-03-22, 09:07 AM   #11
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
No problem, very kind of you.
  Reply With Quote
11-04-22, 10:54 AM   #12
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
I solved the problem, a space was missing in the German translation. Thank you all for the help.
  Reply With Quote
11-04-22, 04:46 PM   #13
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
ah whew .. glad you got it sorted

Although I would be on the US language and it didn't work for me either rofl. But hopefully it works for the people that matter
__________________
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » New Portable Button Problems

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