• 0

    posted a message on Unofficial oUF - methods used for layouts
    i do not know how download the last version of oUF from hxxp://ixo.no/git/oUF.git/ .
    some of you know the way?

    tnx
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    line 5
    local total, col, row, size, anchor, button, growthx, growthy, cols, rows, spacingx, spacingy, gap


    line 105
    function oUF:SetAuraPosition(icons, x)
    	if(icons and x > 0) then
    		col = 0
    		row = 0
    		spacingx = icons.spacingx or 0
    		spacingy = icons.spacingy or 0
    		gap = icons.gap
    		sizex = (icons.size or 16) + spacingx
    		sizey = (icons.size or 16) + spacingy
    		anchor = icons.initialAnchor or "BOTTOMLEFT"
    		growthx = (icons["growth-x"] == "LEFT" and -1) or 1
    		growthy = (icons["growth-y"] == "DOWN" and -1) or 1
    		cols = math_floor(icons:GetWidth() / sizex + .5)
    		rows = math_floor(icons:GetHeight() / sizey + .5)
    
    		for i = 1, x do
    			button = icons[i]
    			if(button and button:IsShown()) then
    				if(gap and button.debuff) then
    					if(col > 0) then
    						col = col + 1
    					end
    
    					gap = false
    				end
    
    				if(col == cols) then
    					col = 0
    					row = row + 1
    				end
    				button:ClearAllPoints()
    				button:SetPoint(anchor, icons, anchor, col * sizex * growthx, row * sizey * growthy)
    
    				col = col + 1
    			end
    		end
    	end
    end


    i modify aura.lua
    set x and y spacing and xsize and ysize
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    i modify aura.lua
    to spawn timeleft buff
    but i have a problem... time not update
    this is a code
    line 8
    local DAY, HOUR, MINUTE, SHORT = 86400, 3600, 60, 5 --modificato da me
    
    function GetFormattedTime(s)
    	if s >= DAY then
    		return format('%dd', floor(s/DAY + 0.5)), s - floor(s)
    	elseif s >= HOUR then
    		return format('%dh', floor(s/HOUR + 0.5)), s - floor(s)
    	elseif s >= MINUTE then
    		if s <= MINUTE*3 then
    			return format('%d:%02d', floor(s/60), s % MINUTE), s - floor(s)
    		end
    		return format('%dm', floor(s/MINUTE + 0.5)), s - floor(s)
    	end
    	return floor(s + 0.5), s - floor(s)
    end


    line 65
    	
    local cdtextframe = CreateFrame("Frame", nil,button)
    cdtextframe:SetAllPoints(button)
    button.cdtextframe = cdtextframe
    
    local cdtext = cdtextframe:CreateFontString(nil, "OVERLAY")
    cdtext:SetFontObject(NumberFontNormal)
    
    cdtext:ClearAllPoints()
    cdtext:SetPoint("TOP", cdtextframe, "TOP", 0, 0)
    button.cdtext = cdtext

    line 104
    cdown = GetPlayerBuffTimeLeft(index)

    line 109
    if(cdown and cdown > 0) then
    	icon.cdtext:SetText(GetFormattedTime(cdown))
    	icon.cdtext:Show()
    else
    	icon.cdtext:Hide()
    end

    anyone have a idea?
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Tnx for help
    Im italian and i speack little englis :'(

    i have another queston :D

    i try to add buff duration up aura... but i not know becouse this not spawn!!
    i try to less a oUF/Elements/aura.lua ... and in this code not have a this text
    this is a problem becouse i can't add duration in debuff and buff?
    Posted in: Unit Frames
  • 0

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

    id guess...
    for tot's target:
    if unit == "targettargettarget" then

    and for focus target:
    if unit == "focustarget" then


    havent tested though


    and for Spawn??
    i use this code??
    local ttt = oUF:Spawn("targettargettarget", "oUF_targettargettarget")
    and for focus target
    local focustarget = oUF:Spawn("focustarget", "oUF_focustarget")


    and other quest
    i have this code
    local color = UnitIsPlayer(unit) and 
       RAID_CLASS_COLORS[select(2, UnitClass(unit))] or 
       UnitReactionColor[UnitReaction(unit, "player")]

    but i rewrite this in
     local color = RAID_CLASS_COLORS[select(2, UnitClass(unit))]

    my ask is: why u use UnitIsPlayer(unit) ? for select played and modify also this character and
    not modify npc, mob or this can create problem in other event?
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Sorry for my english
    I editing a oUF_Lighterfluid author Coldfury.
    my ask is if i can active a focus target's and targetoftargetoftarget.
    I less a oUF code and i understaind when this can modify for active this unit.

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