WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   RuneBar Update (https://www.wowinterface.com/forums/showthread.php?t=54136)

neverg 08-05-16 04:40 PM

RuneBar Update
 
Hi guys,

I'm been porting layout to Legion.

I was now testing the RuneBar and it is not working. Like not updating. It gets displayed correctly it just doesn't get depleted. I've set some prints on the runebar.lua in the update method and it seems it is not being called.

Anyone tested it or facing the same problem?

This is my code, pretty straightforward, I've compared it to other layouts, everything seems fine.


Lua Code:
  1. local CreateRuneBar = function(self)
  2.   local Runes = {}
  3.   for index = 1, 6 do
  4.     local Rune = CreateFrame('StatusBar', nil, self)
  5.     local numRunes, maxWidth, gap = 6, cfg.frames.main.width, 6
  6.     local width = ((maxWidth / numRunes) - (((numRunes-1) * gap) / numRunes))
  7.  
  8.     Rune:SetSize(width, cfg.frames.main.power.height)
  9.     Rune:SetStatusBarTexture(m.textures.status_texture)
  10.     Rune:SetStatusBarColor(unpack(oUF.colors.power["RUNES"]))
  11.     core:setBackdrop(Rune, 2, 2, 2, 2) -- Backdrop
  12.  
  13.     if(index == 1) then
  14.       Rune:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -8)
  15.     else
  16.       Rune:SetPoint('LEFT', Runes[index - 1], 'RIGHT', gap, 0)
  17.     end
  18.     Runes[index] = Rune
  19.   end
  20.   self.Runes = Runes
  21. end



Again, they show up just fine, they just don't update.

Thanks.

p3lim 08-05-16 06:10 PM

https://github.com/haste/oUF/pull/269

Basically, oUF is not ready for 7.0, many elements won't work until haste merges all the pending pullrequests.

Several of us are using our own forks of oUF that has all these fixed merged, such as myself and lightspark.

neverg 08-05-16 06:12 PM

Quote:

Originally Posted by p3lim (Post 317514)
https://github.com/haste/oUF/pull/269

Basically, oUF is not ready for 7.0, many elements won't work until haste merges all the pending pullrequests.

Several of us are using our own forks of oUF that has all these fixed merged, such as myself and lightspark.

Hi p3lim.

I'm using lightspark fork. Sorry, forgot to mention. I was wondering if with yours or lightspark fork the RuneBar is working. If not I might have a look into it to fix it. Although I don't play DK myself.

Layback_ 08-05-16 07:02 PM

I'm currently using lightspark's runebar element which is 100% same as p3lim's one and they work perfectly :D!


neverg 08-05-16 07:09 PM

Quote:

Originally Posted by Layback_ (Post 317517)
I'm currently using lightspark's runebar element which is 100% same as p3lim's one and they work perfectly :D!


Strange. I can't seem to find the problem tho. I even copied p3lim implementation and it still doesn't work. But thanks for the feedback. Problem is in my end then.

Layback_ 08-05-16 07:40 PM

Quote:

Originally Posted by neverg (Post 317518)
Strange. I can't seem to find the problem tho. I even copied p3lim implementation and it still doesn't work. But thanks for the feedback. Problem is in my end then.

And does your other elements work apart from runebar?

neverg 08-05-16 07:44 PM

It is working now... Sorry guys.
I basically refactored my Runes code into a function and somehow left a "self.Runes = Runes" behind, so basically it was registering nothing with oUF after creating it in the function. No wonder update on oUF wasn't being called. Oh well...

Thanks for the help anyway.


All times are GMT -6. The time now is 04:28 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI