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:
if I comment out Lua Code:
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. |
Frame:HasScript() checks if the frame is capable of running the specified script handler. You need to run Frame:GetScript() to see if one is set.
PS: From what I can tell, the personal resource display is essentially a NamePlate dedicated for the player. As such, the NamePlate itself is probably handling the clicks and not the CompactUnitFrame that's built on top of it. |
Quote:
Quote:
|
The base NamePlate is a protected frame. Most of the time when it appears is when the player enters combat and is already in "combat lockdown" in which it cannot be modified. There's no way to disable it the moment it's created, causing the requested functionality to be unreliable.
|
C_NamePlate.SetNamePlateSelfSize(width, height) controls the size of the resource frame. Setting the height to a small number like 0.01 should make it unclickable, although I'm not sure what impact it will have on the stuff anchored to it.
|
Doing that will also mind you, adjust the location of it and make it anchor 50px or something more up than it usually is, but I guess that's the price to pay to make it unclickable with this trick.
|
Just for reference from #wowuidev
http://infobot.rikers.org/%23wowuidev/20160831.html.gz Quote:
|
All times are GMT -6. The time now is 08:32 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI