Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-05-16, 12:36 AM   #1
sk68
A Defias Bandit
Join Date: Dec 2011
Posts: 2
Any way to make the new 7.0.3 Personal Resource Display unclickable?

Hi,

I've been trying to get the Personal Resource Display to become unclickable. So far I've tried the following:

Lua Code:
  1. local function func(frame, setupOptions, frameOptions)
  2.     local unit = frame.displayedUnit or "player"
  3.     if not UnitIsUnit(unit, "player") then return end
  4.  
  5.     print(frame:HasScript("OnClick")) -- returns true
  6.     print(frame:IsProtected()) -- returns false
  7.     frame:Disable()
  8.     frame:EnableMouse(false)
  9.     frame:SetScript("OnClick", function() print("onclick1") end) -- just for testing purposes
  10.     frame:SetScript("OnEnter", function() print("onenter1") end) -- just for testing purposes
  11. end
  12.  
  13. hooksecurefunc("DefaultCompactNamePlateFrameSetupInternal", func)

if I comment out

Lua Code:
  1. frame:Disable()
  2. frame:EnableMouse(false)

then the program prints "onenter1" when the mouse enters the Personal Resource Display and strangely also when I click on it (without moving the mouse). It never prints "onclick1" btw. If I keep the aforementioned two lines uncommented, then the program does not print either "onenter1" or "onclick" but still maintains mouse interactivity, i.e. I can click on it and it will select my toon. So basically I'm stuck atm.

Any help would be appreciated, thank you.

Last edited by sk68 : 08-05-16 at 12:40 AM.
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Any way to make the new 7.0.3 Personal Resource Display unclickable?

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