1. #1

    Unitframe that supports mouseover

    Hi guys,

    i'm looking for a unitframe-addon that supports mouseover just like Pitbull3 did. I don't mean that you can heal a target without clicking on the unit, but that the content of the unitframe (e.g. target) changes.

    To make it clearer: I want to see 3 things if my mouse is not over the unitframe: name, HP in percent, Mana in percent. When my mouse is over the unitframe I want to see: Name HP total and Mana total.

    Unfortunately Pitbull4 doesn't support this anymore. So hoping you can help me out.

    Gastalia

  2. #2
    Deleted
    You can reproduce this functionality using the PB4 lua texts.
    Code:
    if self:IsMouseOver() then
        -- mouseover stuff
    else
        -- usual stuff
    end
    And add UPDATE_MOUSEOVER_UNITS to the text update events.

  3. #3
    so it would look like

    if self:IsMouseOver() then
    local s = Status(unit)
    if s then
    return s
    end
    return "%s/%s",Short(HP(unit),true),Short(MaxHP(unit),true)
    else
    local s = Status(unit)
    if s then
    return s
    end
    return "%s%%",Percent(HP(unit),MaxHP(unit))
    end

    ? im currently not at my pc - thats why im asking

    and where do I find the text update events?

    thanks for the help

  4. #4
    Deleted
    Below the lua text.

    ---------- Post added 2011-03-27 at 04:22 PM ----------

    I just checked, and apparently there is no "self" reference available in the PB4 lua text code. However there is a dedicated IsMouseOver() function for this purpose.

    Code:
    local s = Status(unit)
    if s then return s end
    if IsMouseOver() then
        return "%s/%s",Short(HP(unit),true),Short(MaxHP(unit),true)
    else
        return "%s%%",Percent(HP(unit),MaxHP(unit))
    end
    And according to the LuaText doc, it will even auto-update on mouse status update if the code contains an IsMouseOver call. Awesome!

  5. #5
    now im home, and it works - thanks for the help again - i appreciate it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •