Thread Tools Display Modes
09-05-11, 07:56 AM   #1
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
HealPrediction - Help appreciated!

Hey ecervybody!

I've made my own layout, mixed from different existing layout and some own ideas and so on, and it's working fine so far.

But I can't get along with HealPrediction - I tried about 6 hours (no kidding), I even used the already existing threads about it (I don't post in them because I'm no necro-threader) but it just won't work.
I even used oUF_HealComm4 and added the code into my layout, but it's driving me insane.

so, here are my core.lua and lib.lua:
core.lua
lib.lua

That's the code snippet I added in lib.lua @line 167, taken from oUF_HealComm4:
Code:
	self.HealCommBar = CreateFrame('StatusBar', nil, self.Health)
	self.HealCommBar:SetHeight(0)
	self.HealCommBar:SetWidth(0)
	self.HealCommBar:SetStatusBarTexture(self.Health:GetStatusBarTexture():GetTexture())
	self.HealCommBar:SetStatusBarColor(0, 1, 0, 0.25)
	self.HealCommBar:SetPoint('LEFT', self.Health, 'LEFT')

	-- optional flag to show overhealing
	self.allowHealCommOverflow = true
maybe I missed something incredibly simple or I'm just not able of adding HealPrediction.

So, please, help me, even a flame is welcome as long as it provides the solution to get it working!

Greetz, FaulTier
__________________
  Reply With Quote
09-05-11, 10:58 AM   #2
Thalyra
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 13
use the .HealPrediction element (its part of oUF in the actual version)

here is an example:

Code:
local myBar = CreateFrame("Statusbar", nil, self.Health)
myBar:SetWidth(self.Health:GetWidth())
myBar:SetStatusBarTexture(texture)
myBar:SetStatusBarColor(0, 1, 0)
myBar:SetPoint("TOPLEFT", self.Health:GetStatusBarTexture(), "TOPRIGHT", 0, 0)
myBar:SetPoint("BOTTOMLEFT", self.Health:GetStatusBarTexture(), "BOTTOMRIGHT", 0, 0)

local otherBar = CreateFrame("Statusbar", nil, self.Health)
otherBar:SetWidth(self.Health:GetWidth())
otherBar:SetStatusBarTexture(texture)
otherBar:SetStatusBarColor(0, 1, 0)
otherBar:SetPoint("TOPLEFT", myBar:GetStatusBarTexture(), "TOPRIGHT", 0, 0)
otherBar:SetPoint("BOTTOMLEFT", myBar:GetStatusBarTexture(), "BOTTOMRIGHT", 0, 0)

self.HealPrediction = {
    myBar = myBar,
    otherBar = otherBar,
    maxOverflow = 1.05 -- means 5 % overflow
}
  Reply With Quote
09-05-11, 11:06 AM   #3
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
maybe I'm too naive, but can I copy'n'paste your code and it'll work straight on? :3
__________________
  Reply With Quote
09-05-11, 11:13 AM   #4
Thalyra
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 13
you only have to replace the local var texture with your texture you want, then it should work
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » HealPrediction - Help appreciated!

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