• 0

    posted a message on Unofficial oUF - methods used for layouts
    if unit == "targettarget" then 
      hp.value:SetFont(font_ital, fontHeight-2) 
      hp.value:SetPoint("CENTER", hp, "CENTER") 
      hp.value:SetJustifyH("CENTER") 
    end

    I think :)
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    So it seems my code really wasn't working after all - the happiness update happened incidentally as you may say.

    I digged through the code a little (with my limited knowledge of LUA) and I think the UNIT_HAPPINESS only actually gets hooked up if there is a happiness field in the unit table, meaning if you previously used the power bar or other to indicate happiness, the event will never get fired.

    I changed my layout a little (basically what Haste just posted, but I swear I didn't read it until afterward, heh).

    Here's the new one, http://pastey.net/92868 which do work as intended (verified by a lot of addmessages - I don't really know how to debug LUA code). Important lines highlighted.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    This http://hastey.pastey.net/92864 is a pastey of my current (very much) WIP layout. I haven't had any problems with pet happiness updating. I just updated to the latest snapshot of oUF 15 minutes ago to make certain I have a recent version.

    The layout is far from finished - but I use it now for my twink hunter I'm leveling as unitframes are in a working state - so I don't know how much use it will be "out of the box" but maybe it can help some.

    Edit: The important stuff is highlighted in the pastey.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Happiness seem to work fine for me, though I'm not sure if it has anything to do with my version of oUF (I can't figure out where I can check version).

    Edit: To actually maybe contribute, I use this in the big setup function
    if unit == "pet" then 
      self.PostUpdateHappiness = updateName
    end


    And this in the updateName function
    if unit ~= "pet" then
      local c = (not UnitIsConnected(u) or UnitIsGhost(u) or UnitIsDead(u)) and grey or white
      self.Name:SetTextColor(unpack(c))
    else
      local h = GetPetHappiness()
      local c = white
      if h == 2 then
        c = {1, 1, 0}
      elseif h == 1 then
        c = {1, 0, 0}
      end
      self.Name:SetTextColor(unpack(c))
    end


    (I use the pet name to display happiness.)
    Posted in: Unit Frames
  • 0

    posted a message on Chatter- Ace3 chat mod (was Chatterbox)
    One last thing I found out I'm missing a little, the ability to suppress the join/leave spam on custom channels (I can't figure out a way to remove those in the Blizzard options, if it's there, just ignore my noobiness).
    Posted in: General AddOns
  • 0

    posted a message on Chatter- Ace3 chat mod (was Chatterbox)
    Looks very nice.

    Two things I'd like to see - though whether they are anything other uses I don't know.

    1) An option to hide the chat copy icon until mousing over the chat frame. It clashes some even with my not-so-special UI design.

    2) A default way to hide channel names, turning "[5. Sekrits] [Char] Blabla" into "[5] [Char] Blabla". This isn't very important though since it can be done by typing it in.

    Great work as always, Antiarc.
    Posted in: General AddOns
  • To post a comment, please or register a new account.