Quantcast
WoWInterface - View Single Post - How to hide "ClassNameplateManaBarFrame" using OUF?
View Single Post
04-13-20, 04:39 PM   #2
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 121
Originally Posted by Lybrial View Post
Hi,

im using oUF to create my namepaltes but I have a problem with my personal resource nameplate.



As you can see on this picture there are three bars.
- The first is the health bar I created.
- The second is the power bar I created.
- The third is the default blizzard ClassNameplateManaBarFrame

I thought using oUF would cause ClassNameplateManaBarFrame to be hidden or something else.

Lua Code:
  1. _G.ClassNameplateManaBarFrame:Hide();

Does not keep it hidden.

Any ideas?
I don't use oUF myself. But it sounds like something is trigger it to show again. Some sort of refresh or what not. You can try to review the code and see if anything is doing that.

Otherwise there are several methods to overwrite the Show method for frames. Though I tend to avoid doing that unless absolutely necessary.

This is JUST an example. Again I normally avoid doing such things.

Code:
_G.ClassNameplateManaBarFrame:SetScript("OnShow", function() return end)
You could also try overwriting the frames Show function. i.e
Code:
_G.ClassNameplateManaBarFrame.Show = function(self) self:Hide() end
There is also another method but again it's a bit redundant. However it has the benefit that are using a hooksecurefunc (which is better programming practice).

Code:
hooksecurefunc(_G.ClassNameplateManaBarFrame, "Show", function(self) self:Hide() end)
etc.. etc.. etc..

The cleanest solution would be to review the oUF code to determine what keeps showing it and disabling it there.
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
  Reply With Quote