View Single Post
05-29-23, 05:00 AM   #19
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,939
I have a similar problem in nUI now that I have reinstated its action bars back to service.

nUI adds Keybinding info to the action button tooltip which of course no longer displays permanently due to the tooltip changes I presume.

Now, looking at your findings I tried to do something similar but it has gone belly up.

In PLAYER_LOGIN I have the following block of code - amongst other code
Lua Code:
  1. for i in pairs( nUI_ButtonBars.Bars ) do
  2.     local bar = nUI_ButtonBars.Bars[i];
  3.     for row in pairs( bar.Buttons ) do
  4.         for col in pairs( bar.Buttons[row] ) do
  5.             local button      = bar.Buttons[row][col];
  6.             local key1, key2  = GetBindingKey( "CLICK "..button:GetName()..":LeftButton" );
  7.  
  8.             TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Spell, function(self)
  9.                 if key1 then GameTooltip:AddLine( nUI_L["Key Binding"].." 1: |cFF00FFFF"..GetBindingText( key1, "KEY_" ).."|r", 1, 1, 1 ); end
  10.                 if key2 then GameTooltip:AddLine( nUI_L["Key Binding"].." 2: |cFF00FFFF"..GetBindingText( key2, "KEY_" ).."|r", 1, 1, 1 ); end                                  
  11.                 if not key1 and not key2 then GameTooltip:AddLine( nUI_L["No key bindings found"], 1, 1, 1 ); end
  12.                  GameTooltip:AddLine( nUI_L["<ctrl-alt-right click> to change bindings"], 0, 1, 1 );                                        
  13.             end)
  14.  
  15.             button:SetScript( "OnEnter", function()
  16.                 if nUI_Options.combat_tooltips or not InCombatLockdown() then
  17.                     button:SetTooltip()
  18.                     -- Old Code used to be here
  19.                     GameTooltip:Show();
  20.                 end
  21.             end );
  22.         end
  23.     end
  24. end
All but the TooltipDataProcessor open and close lines were already in the code, but initially inside the OnEnterScript.

It worked fine before Dragonflight but now inside OnEnter it briefly shows but then disappears, and outside OnEnter it shows a ton of lines running down the screen. Instead of the 1-4 I am expecting per button.

Anyone have any ideas on how I would get it working like before ?

Thanks in advance.


edit:
I also tried creating my own tooltip as follows:
local tooltip = CreateFrame("GameTooltip",nil,button,"GameTooltipTemplate")
And using this instead of GameTooltip but no difference.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 05-29-23 at 05:19 AM.
  Reply With Quote