Quantcast
oUF_Smooth problems - WoWInterface
Thread Tools Display Modes
02-17-14, 02:36 PM   #1
Fumler
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 8
oUF_Smooth problems

Hello.

Been trying to do a layout based on oUF_P3lim.

I make a frame for Power in my shared function, and I set
Lua Code:
  1. self.Power = Power
everything works fine at this point, no issues.

But if I then set
Lua Code:
  1. self.Power.Smooth = true
after previous line, the powerbar no longer updates the value. So even if I have 50% power, the bar is completely filled.

Any ideas?

Lua Code:
  1. local function Shared(self, unit)
  2.  
  3. ...
  4.  
  5.  
  6.         local Power = CreateFrame('StatusBar', nil, self)
  7.         Power:SetHeight(20)
  8.         Power:SetWidth(200)
  9.         Power:SetStatusBarTexture(TEXTURE)
  10.  
  11.         Power:SetPoint('BOTTOMRIGHT')
  12.         Power:SetPoint('CENTER')
  13.  
  14.         Power.frequentUpdates = true
  15.         Power.colorClass = false
  16.         Power.colorPower = true
  17.  
  18.         local PowerBG = Power:CreateTexture(nil, 'BORDER')
  19.         PowerBG:SetAllPoints(Power)
  20.         PowerBG:SetTexture(TEXTURE)
  21.         PowerBG:SetAlpha(1)
  22.         PowerBG.multiplier = .3
  23.  
  24.         local PowerValue = Power:CreateFontString(nil, 'OVERLAY')
  25.         PowerValue:SetPoint('LEFT', 5, 0)
  26.         PowerValue:SetJustifyH('LEFT')
  27.         PowerValue:SetFont(FONT, 12)
  28.         PowerValue:SetShadowOffset(1, -1)
  29.         PowerValue.frequentUpdates = 0.1
  30.  
  31.         local PowerPercent = Power:CreateFontString(nil, "OVERLAY")
  32.         PowerPercent:SetPoint("RIGHT", -5, 0)
  33.         PowerPercent:SetFont(FONT, 12)
  34.         PowerPercent:SetShadowOffset(1, -1)
  35.         PowerPercent:SetJustifyH("RIGHT")
  36.         PowerPercent.frequentUpdates = 0.1
  37.         Power.PowerPercent = PowerPercent
  38.  
  39.         Power.bg = PowerBG
  40.         Power.PowerValue = PowerValue
  41.         self.Power = Power
  42.         self.Power.Smooth = true
  43. end
  Reply With Quote
02-17-14, 03:25 PM   #2
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 453
Is oUF_Smooth listed under OptionalDeps in your layout's .toc?
  Reply With Quote
02-17-14, 04:18 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Even if it's not, adding a "Smooth = true" key on your power bar shouldn't stop it from updating.

Most likely you are getting a Lua error. Install BugSack.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote
02-17-14, 07:56 PM   #4
Fumler
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 8
Already have BugSack, it does not give me any error except for when I target a unit without power, but that is natural since I am not checking for it atm.

But yea, no lua errors in BugSack for player frame.
  Reply With Quote
02-18-14, 01:07 PM   #5
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 453
oUF should display an empty power bar when the unit has no power. Post that error.
  Reply With Quote
02-18-14, 02:23 PM   #6
Fumler
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 8
Problem was that it was calling function from both embedded version and standalone version of oUF_Smooth. Found that out when I looked again at the LUA error that the directories were different for each call.

Thanks for the help, silly of me to not check this ^^
  Reply With Quote
02-18-14, 02:23 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Also post your entire code, not some random snippet that itself references other parts of your code that you didn't post.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF_Smooth problems

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