BG Color Troubles
Hey, after speaking with Haste on IRC he suggested posting here for better help. For the life of me I am unable to figure out what I have done wrong here. Basically my BG Color for my status bars changes on me from what I "want" to a solid black color. It does however fix itself "at random" when I do a /reloadui though.
Solid Black BG - Unwanted http://img402.imageshack.us/img402/5...2809185119.jpg Colored/Shaded BG - How I want it to look 100% of the time http://img402.imageshack.us/img402/5...2809185514.jpg LUA File - Please excuse the poor excuse I have created for an lua file, it's quite embarassing. I am still in the process of learning and when I went to paste it none of the indents came with it =(. http://www.pastey.net/113249 Any help is greatly appreciated, and don't be shy to throw some pointers or other suggestions my way =) |
line 188: make that global into a local, also set the layer to 'BACKGROUND'
line 217: set the layer to 'BACKGROUND' line 249: set the layer to 'BACKGROUND' |
Quote:
Code:
self:SetBackdrop({ Back to work I guess =P |
Are you using oUF_Smooth?
What I am aware of is that if you target some kind of npc with ManaMax = 0 and after that targeting a warrior or someone else with 0 rage the power bar is completly filled. Btw you may fix this by setting the statusbarvalue to 0 at startup, just add self.Power:SetValue(0) after you created the powerbar. |
Quote:
|
Ok gave this a try now that I am home from work, with no luck :(
Here is what happens - With your line added Both player and target (myself) have full runic power bars. When another unit is selected then myself again the target bar drops to 0 Without your code Regardless of who is targeted or when the power bar always shows as being full UNTIL some ability is used that alters the current power (ie. using Death and Decay to generate RP). Hope this helps some. |
It's an issue with SmoothUpdate. I posted a fix in the comments in the hope people would find it there: http://pastey.net/111986
If that doesn't fix it, please let me know, if possible with a way to reproduce it. Edit: That pastey is meant to replace the current SmoothUpdate file if that wasn't clear. |
Quote:
Edit: That looks like it did the trick, it appears to be working great now. I also left out the above mentioned Code:
self.Power:SetValue(0) Edit2: Ok this isn't a huge deal, but I am noticing when I have smooth on it will never let my RP = 0. It always stays at 1/100. When I turn off smooth the bar resets to 0. Edit3: Ok so I added the Code:
self.Power:SetValue(0) |
Some questions.
Why bar:SetValue_(value) and not bar:SetValue(value) ? Does SetValue_ even work, what does it? Other than that... if cur == value or abs(cur - value) < 2 then or if cur == value or abs(new - value) < 2 then and why? |
Of course it works, otherwise I wouldn't post it. ;)
local function SmoothBar(self, bar) bar.SetValue_ = bar.SetValue bar.SetValue = Smooth end When you set smoothing for a bar, this function is ran. SetValue_ is a reference to the old SetValue function and bypasses the smoothing. The smoothing has a margin of 2, which was causing bars to not fill completely. The final SetValue_(value) makes sure that after smoothing the bar is set to value. Your second question... *shrug* We were trying to fix the bars filling across the screen issue at the time, so I had multiple versions/possible fixes running. Could be it's left over from another test, could be I had some other reason for it. I can't really remember. The second is used in oUF_Caellian and I haven't seen any odd behaviour. |
All times are GMT -6. The time now is 01:27 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI