Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

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


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