• 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from p3lim »

    whats oUF_oUF_TsoHG?



    You know, these are the very new supa dupa ultra cool unitframes, forked by p3lim, acting like a supa dupa cool all knowing guy with a very stupid arrogantly attitude... sorry man, u did a cool layout for oUF, but that does not mean you can become an asshole or act like this, i watched your answers all around the web, and sorry to say you became an f*cking asshole, since your layout is loved by many people.

    So.. please, just shut the fuck up and dont mess with me and my typos, look at your own nose then come back, thanks.


    Quote from hipjipp »

    I tested it on my layout and it works fine. To explain it simpler (or atleast try to), put this code in your main function outside the frames like the name code etc etc.
    	local ct = hp:CreateFontString(nil, "OVERLAY")
    	ct:SetPoint("CENTER", 0, -1)
    	ct:SetFont("Fonts\\FRIZQT__.ttf", 14)
    	ct:SetTextColor(1, 1, 1)
    	self.CombatText = ct
    	hp.CombatText = ct

    Change what you like.. If you'd like to make it custom for different frames or hide it for a specific frame you could do: (taken from my code)
    	if unit=="player" then 
    		if LibDruidMana then 
    			local druid = hp:CreateFontString(nil, "OVERLAY")
    			druid:SetFont(font, 12, "OUTLINE")
    			druid:SetTextColor(1,1,1) 
    			druid:SetPoint("RIGHT", hp, "LEFT", -50, 0)
    			druid:SetJustifyH("LEFT")
    			druidMana = druid
    		end
    		name:Hide() 
    		ppp:SetPoint("LEFT", hp, "LEFT", 2, 0)
    		ppp:SetJustifyH"LEFT"
    		local missing = hp:CreateFontString(nil, "OVERLAY")
    		missing:SetPoint("CENTER", hp, "CENTER", -20, 0)
    		missing:SetJustifyH("CENTER")
    		missing:SetFont(font, 12, "OUTLINE")
    		self.Missing = missing
    -- Combat text below (not in my code, this is just an example) --
    		local ct = hp:CreateFontString(nil, "OVERLAY")
    		ct:SetPoint("LEFT", self, "RIGHT", 20, -1) -- <witch side to anchor to>, <frame>, <to witch side of frame>, <xOffset>, <yOffset>
    		ct:SetFont("Fonts\\skurri.ttf", 14) -- <Font file>, <size>, <layer>
    		ct:SetJustifyH("RIGHT") -- Justify Horisontal
    		ct:SetTextColor(1, 1, 1) -- color
    		self.CombatText = ct
    		hp.CombatText = ct
    -- Ends --
    	end




    Thanks for your help, appreciate it.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from sezz »

    I also asked that a while ago, but didn't get any answers, so I "tried" it mysef:

    You could try my ouf combat text addon (based on aguf combat text) that is working very well on my "test ui":
    http://www.rootkit.at/files/oUF_CombatText.rar
    Screenshot is here (2,3mb, probably set the screenshot quality too high ;)):
    http://www.rootkit.at/files/wow/screenshots/WoWScrnShot_041008_213546_TestUI_WIP.jpg

    If someone has a better idea for initialization, any help appreciated...
    The problem was that I couldn't use the fontstring for receiving events, so I just used it's parent...



    Hi, that looks cool, could you please explain a little bit more about your Addon? How to get it working actually, for me it does not show anything.

    Im using oUF Kosken and oUF_oUF_TsoHG
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from p3lim »

    function pUF:UNIT_PORTRAIT_UPDATE(unit)
     if(self.unit ~= unit) then return end
     if not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit) then
      self.Portrait:SetModelScale(4.25)
      self.Portrait:SetPosition(0,0,-1.5)
      self.Portrait:SetModel("Interface\\Buttons\\talktomequestionmark.mdx")
     else
      self.Portrait:SetUnit(unit)
      self.Portrait:SetCamera(0)
      self.Portrait:Show()
     end
    end



    Haha, one letter :) ill try that out, ill give feedback later on that, thanks.


    Edit: Okay no more errors now, but cant see any Portrait, still some editing needed?
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from Grayhoof »

    I've added portaits to the version I have been using for a while. However, I have not kept up with the recent changes to oUF, so not sure how I did it still fits in. I'll list the relevant code here in case someone wants to get it to work with the current code base.

    oUF.lua - Add this to the subTypes table:
    ["Portrait"] = "UNIT_PORTRAIT_UPDATE",



    oUF.lua - Add this to the RegisterObject method:
    elseif(subType == "Portrait") then
    object:RegisterEvent"UNIT_PORTRAIT_UPDATE"



    oUF.lua - Add this function:
    function oUF:UNIT_PORTRAIT_UPDATE(unit)
     if(self.unit ~= unit) then return end
     if not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit) then
      self.Portrait:SetModelScale(4.25)
      self.Portrait:SetPosition(0,0,-1.5)
      self.Portrait:SetModel("Interface\\Buttons\\talktomequestionmark.mdx")
     else
      self.Portrait:SetUnit(unit)
      self.Portrait:SetCamera(0)
      self.Portrait:Show()
     end
    end



    Then add something like this to your layout, tailored to your desires:
    local portrait = CreateFrame("PlayerModel", nil, self)
    portrait:SetScript("OnShow",function() this:SetCamera(0) end)
    portrait:SetWidth(24)
    portrait:SetHeight(24)
    portrait:SetPoint("TOPLEFT", self, "TOPLEFT", 2, -2)
    self.Portrait = portrait






    That seems to not work with the last pUF Version.

    Hm, ill wait for the "pUF" Layout for oUF, hopefully it will work for that.


    But thanks for sharing this Code.



    greets
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from p3lim »

    not that i know of right now, no


    oki thanks, the addon is very good so far, and not that high on memory usage etc. as i expected.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from p3lim »

    http://wow.curse.com/downloads/details/5974/

    and there is no such thing as pUF anymore



    Of course there is, i did not delete my pUF Addon...

    Thanks for the Link.


    So there is no chance with just addin some Lines of Code to oUF Layout (or pUF layout...) to add Portraits instead of using an other Addon?
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    One Question please, is it possible to add Portraits to pUF/oUF? Or do i need extra addosn for that? Hopefully someone can help me out on this.




    greets
    Posted in: Unit Frames
  • To post a comment, please or register a new account.