Thread Tools Display Modes
08-20-09, 03:27 AM   #1
Lunarion
A Deviate Faerie Dragon
 
Lunarion's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2008
Posts: 12
Hiding PlayerFrame

I'll start out by saying that am a complete lua idiot and really don't know much other than how to edit very simple things. I have a feeling that what I'm looking to do isn't as hard as I think it is, but I'm just missing it completely. Anywhos, I use the oUF_Nivaya layout which I love quite a bit. I'm looking to edit it slightly however to fit my UI. All I want to do is show/hide the player frame based on being in combat, being in a group/raid, or having a target.

It should hide when I'm out of combat, have no target, or am not in a group.

It should show when I am in combat, have a target, or am in a group.

Could anyone help me out here? Or point me in the direction of a place that could help me? I've tried playing in the code myself, but I know for a fact that I'm doing it wrong. I'd post what I've been trying, but it'd be embaressing.
__________________

Last edited by Lunarion : 08-20-09 at 03:31 AM.
  Reply With Quote
08-20-09, 04:06 AM   #2
Dainton
A Flamescale Wyrmkin
 
Dainton's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 115
oUF_BarFader will do the target and combat thing, but not the group. Closest and easiest fix I can think of for you.
  Reply With Quote
08-20-09, 05:11 AM   #3
Lunarion
A Deviate Faerie Dragon
 
Lunarion's Avatar
AddOn Compiler - Click to view compilations
Join Date: Mar 2008
Posts: 12
Edit2: So apparently I'm just an idiot and had some syntax errors and didn't have 'display lua errors' enabled. The only catch is that it fades and reappears a little behind the target window, but I can live with that. Sorry for wasting your time! XD

---

Edit: Alright, so I managed to get it working, however because my buffs and debuffs are attached to the player frame, it is showing whenever a buff or debuff updates even outside of combat or having a target, at least I think that is what it's happening.

Is there any way to make it ignore the buff/debuff updates?

---

That plugin was actually the first thing I tried.

I added it to the OptionalDeps. That didn't work. I then tried adding:

Code:
  --[[ oUF_BarFader support ]]
    if(unit=="player" and IsAddOnLoaded("oUF_BarFader")) then
        self.BarFade = true
        self.BarFaderMinAlpha = 0
        self.BarFaderMaxAlpha = 1
end
:to the oUF_Nivaya.lua config which also didn't work. I may have done that wrong. Using that would be fine, and make my life easy, but it hates me.
__________________

Last edited by Lunarion : 08-20-09 at 06:02 AM. Reason: Update
  Reply With Quote
08-20-09, 06:31 AM   #4
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Code:
--[[

	Shared:
	 - BarFade [boolean]
	 - BarFadeMinAlpha [value] default: 0.25
	 - BarFadeMaxAlpha [value] default: 1

--]]
Fade, not Fader.


Actually, what you have should still work since there's a default value. I dunno. Try adding a debug message to make sure that chunk of code is being called:

print('omg debug')

If you don't see that in your chat window then it's not being called for some reason. Also did you keep oUF_BarFader as an optionaldep when you added that in? If not, it's possible your layout was loaded before the plugin, meaning IsAddOnLoaded(...) would resolve to false.

Last edited by Waverian : 08-20-09 at 06:34 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Hiding PlayerFrame

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