WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   HealPrediction - Help appreciated! (https://www.wowinterface.com/forums/showthread.php?t=41354)

FaulTier 09-05-11 07:56 AM

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

Thalyra 09-05-11 10:58 AM

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
}


FaulTier 09-05-11 11:06 AM

maybe I'm too naive, but can I copy'n'paste your code and it'll work straight on? :3

Thalyra 09-05-11 11:13 AM

you only have to replace the local var texture with your texture you want, then it should work


All times are GMT -6. The time now is 07:38 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI