• 0

    posted a message on Unofficial oUF - methods used for layouts
    I'm back again :P
    Meh at my target's buffs being the same size as the whole UF and on the left side, any way to make them smaller and on the right side so they don't overlap my own frame?
    :)

    Oh, p3lim, heard you're in beta (*cough* Lyn was interviewed in this week's PMUI *cough*)
    Gratz ^^
    Posted in: Unit Frames
  • 0

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

    Your post was extremely cryptic, so no wonder I cyphered it wrong :). Look for :SetStatusBarTexture. It controls what texture the bar gets.


    Tried it, only became transparent grey'ish.

    Ah thanks :) Changed back to the default one (with edited colours lol) after not having worked with the new one :P
    Posted in: Unit Frames
  • 0

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

    Keywords: updateHealth(), :SetStatusBarColor(), .Power

    If you actually read the could, you'll see that updateHealth() runs :SetStatusBarColor() on self.Power.
    In updateHealth(): bar is a reference to self.Health
    In updatePower(): bar is a reference to self.Power

    Posting too much code is better than posting too little btw :).


    Not really what I need, I changed the tga file and got a nice looking hp bar, but I wanna change the manabar so it doesn't have the same texture as the hp bar :S

    Changed the path to the power one, got no mana bar. Changed the other one too and got no bars at all, just gray-transparent.
    Posted in: Unit Frames
  • 0

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

    i think the error is on line #53 of the code you didnt post....


    Line 53 is like "local UnitIsDead(ghost)" or something...

    Just the oUF_lily tbh... Just played a little with the settings.

    Anyway, code here:
    local select = select
    local UnitIsPlayer = UnitIsPlayer
    local UnitIsDead = UnitIsDead
    local UnitIsGhost = UnitIsGhost
    local UnitIsConnected = UnitIsConnected
    local RAID_CLASS_COLORS = RAID_CLASS_COLORS
    local ICON_LIST = ICON_LIST
    local UnitClass = UnitClass
    local UnitReactionColor = UnitReactionColor
    local UnitReaction = UnitReaction
    
    local height, width = 25, 100
    
    local menu = function(self)
    	local unit = self.unit:sub(1, -2)
    	local cunit = self.unit:gsub("(.)", string.upper, 1)
    
    	if(unit == "party" or unit == "partypet") then
    		ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor", 0, 0)
    	elseif(_G[cunit.."FrameDropDown"]) then
    		ToggleDropDownMenu(1, nil, _G[cunit.."FrameDropDown"], "cursor", 0, 0)
    	end
    end
    
    local updateName = function(self, event, unit)
    	if(self.unit == unit or (not unit and self.unit)) then
    		local unit = unit or self.unit
    		local name = UnitName(unit)
    		local index = GetRaidTargetIndex(self.unit)
    		if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) then
    			self.Name:SetTextColor(.6, .6, .6)
    		else
    			local color = UnitIsPlayer(unit) and RAID_CLASS_COLORS[select(2, UnitClass(unit))] or UnitReactionColor[UnitReaction(unit, "player")]
    			if(color) then self.Name:SetTextColor(color.r, color.g, color.b) end
    		end
    
    		if(index) then
    			self.Name:SetText(ICON_LIST[index].."22|t"..name)
    		else
    			self.Name:SetText(name)
    		end
    	end
    end
    
    local updateHealth = function(self, event, bar, unit, min, max)
    	if(UnitIsDead(unit)) then
    		bar:SetValue(0)
    		bar.value:SetText"Dead"
    	elseif(UnitIsGhost(unit)) then
    		bar:SetValue(0)
    		bar.value:SetText"Ghost"
    	elseif(not UnitIsConnected(unit)) then
    		bar.value:SetText"Offline"
    	else
    		local c = max - min
    		if(c > 0) then
    			bar.value:SetFormattedText("-%d", c)
    		else
    			bar.value:SetText(max)
    		end
    	end
    
    	if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) then
    		self.Name:SetTextColor(.6, .6, .6)
    		self.Power:SetStatusBarColor(.6, .6, .6)
    	else
    		self:UNIT_NAME_UPDATE(event, unit)
    	end
    end
    
    local updatePower = function(self, event, bar, unit, min, max)
    	if(min == 0) then
    		bar.value:SetText()
    	elseif(UnitIsDead(unit) or UnitIsGhost(unit)) then
    		bar:SetValue(0)
    	elseif(not UnitIsConnected(unit)) then
    		bar.value:SetText()
    	else
    		bar.value:SetFormattedText("%d | ", min)
    	end
    
    	if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) or not UnitIsConnected(unit)) then
    		bar:SetStatusBarColor(.6, .6, .6)
    	else
    		local color = UnitIsPlayer(unit) and RAID_CLASS_COLORS[select(2, UnitClass(unit))] or UnitReactionColor[UnitReaction(unit, "player")]
    		if(color) then bar:SetStatusBarColor(color.r, color.g, color.b) end
    	end
    end
    
    local auraIcon = function(self, button)
    	button.icon:SetTexCoord(.07, .93, .07, .93)
    end
    
    local func = function(settings, self, unit)
    	self.menu = menu
    
    	self:SetScript("OnEnter", UnitFrame_OnEnter)
    	self:SetScript("OnLeave", UnitFrame_OnLeave)
    
    	self:RegisterForClicks"anyup"
    	self:SetAttribute("*type2", "menu")
    
    	local hp = CreateFrame"StatusBar"
    	hp:SetHeight(15)
    	hp:SetStatusBarTexture"Interface\\AddOns\\oUF_Lily\\textures\\statusbar"
    	hp:SetStatusBarColor(.25, .25, .35)
    
    	hp:SetParent(self)
    	hp:SetPoint"TOP"
    	hp:SetPoint"LEFT"
    	hp:SetPoint"RIGHT"
    
    	local hpbg = hp:CreateTexture(nil, "BORDER")
    	hpbg:SetAllPoints(hp)
    	hpbg:SetTexture(0, 0, 0, .5)
    
    	local hpp = hp:CreateFontString(nil, "OVERLAY")
    	hpp:SetPoint("RIGHT", -2, -1)
    	hpp:SetFontObject(GameFontNormalSmall)
    	hpp:SetTextColor(1, 1, 1)
    
    	hp.bg = hpbg
    	hp.value = hpp
    	self.Health = hp
    	self.OverrideUpdateHealth = updateHealth
    
    	local pp = CreateFrame"StatusBar"
    	pp:SetHeight(10)
    	pp:SetStatusBarTexture"Interface\\AddOns\\oUF_Lily\\textures\\statusbar"
    	pp:SetStatusBarColor(.25, .25, .35)
    
    	pp:SetParent(self)
    	pp:SetPoint"LEFT"
    	pp:SetPoint"RIGHT"
    	pp:SetPoint("TOP", hp, "BOTTOM")
    
    	local ppbg = pp:CreateTexture(nil, "BORDER")
    	ppbg:SetAllPoints(pp)
    	ppbg:SetTexture(0, 0, 0, .5)
    
    	local ppp = pp:CreateFontString(nil, "OVERLAY")
    	ppp:SetPoint("RIGHT", hpp, "LEFT", 0, 0)
    	ppp:SetFontObject(GameFontNormalSmall)
    	ppp:SetTextColor(1, 1, 1)
    
    	pp.value = ppp
    	pp.bg = ppbg
    	self.Power = pp
    	self.OverrideUpdatePower = updatePower
    
    	local leader = self:CreateTexture(nil, "OVERLAY")
    	leader:SetHeight(16)
    	leader:SetWidth(16)
    	leader:SetPoint("BOTTOM", hp, "TOP", 0, -5)
    	leader:SetTexture"Interface\\GroupFrame\\UI-Group-LeaderIcon"
    	self.Leader = leader
    
    	local name = hp:CreateFontString(nil, "OVERLAY")
    	name:SetPoint("LEFT", 2, -1)
    	name:SetPoint("RIGHT", ppp, "LEFT")
    	name:SetJustifyH"LEFT"
    	name:SetFontObject(GameFontNormalSmall)
    	name:SetTextColor(1, 1, 1)
    	self.Name = name
    	self.UNIT_NAME_UPDATE = updateName
    
    	if(not unit or unit == "target") then
    		local buffs = CreateFrame("Frame", nil, self)
    		buffs:SetHeight(hp:GetHeight() + pp:GetHeight())
    		buffs:SetWidth(10*height)
    		if(not unit) then
    			buffs.initialAnchor = "TOPRIGHT"
    			buffs.num = 4
    			buffs:SetPoint("LEFT", self, "RIGHT")
    		else
    			buffs.initialAnchor = "BOTTOMRIGHT"
    			buffs.num = 8
    			buffs["growth-x"] = "LEFT"
    			buffs:SetPoint("RIGHT", self, "LEFT")
    		end
    		buffs.size = math.floor(buffs:GetHeight() + .5)
    		self.Buffs = buffs
    	end
    
    	if(unit and not (unit == "targettarget" or unit == "player")) then
    		local debuffs = CreateFrame("Frame", nil, self)
    		debuffs:SetHeight(hp:GetHeight() + pp:GetHeight())
    		debuffs:SetWidth(10*height)
    		debuffs:SetPoint("LEFT", self, "RIGHT")
    		debuffs.size = math.floor(debuffs:GetHeight() + .5)
    		debuffs.initialAnchor = "BOTTOMLEFT"
    		debuffs.num = 5
    		self.Debuffs = debuffs
    	end
    
    	if(not unit) then
    		self.Range = true
    		self.inRangeAlpha = 1
    		self.outsideRangeAlpha = .5
    	end
    
    	self.RAID_TARGET_UPDATE = updateName
    	self:RegisterEvent"RAID_TARGET_UPDATE"
    
    	self.PostCreateAuraIcon = auraIcon
    
    	return self
    end
    
    oUF:RegisterStyle("Lily", setmetatable({
    	["initial-width"] = width,
    	["initial-height"] = height,
    }, {__call = func}))
    
    --[[
    -- oUF does to this for, but only for the first layout registered. I'm mainly
    -- adding it here so people know about it, especially since it's required for
    -- layouts using different styles between party/partypet/raid/raidpet. It is
    -- however smart to execute this function regardless.
    --
    -- There is a possibility that another layout has been registered before yours.
    --]]
    oUF:SetActiveStyle"Lily"
    
    local focus = oUF:Spawn"focus"
    focus:SetPoint("CENTER", 0, -450)
    local player = oUF:Spawn"player"
    player:SetPoint("CENTER", -120, -240)
    local target = oUF:Spawn"target"
    target:SetPoint("CENTER", 120, -240)
    local tot = oUF:Spawn"targettarget"
    tot:SetPoint("CENTER", 0, -260)
    local party = oUF:Spawn("header", "oUF_Party")
    party:SetPoint("TOPLEFT", 30, -30)
    party:SetManyAttributes("showParty", true, "yOffset", -25)
    party:Show()


    Was that too much code or? :P
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Just wondering, how do I create a different manabar than the hp bar?
    Managed to recolor both the bars, SS: http://img225.imageshack.us/img225/3906/wowscrnshot050608172032rd7.jpg
    But I can't figure out how to change only one of them :(
    Posted in: Unit Frames
  • 0

    posted a message on Can't access config menu for Chinchilla
    Still doesn't work...
    Posted in: AddOn HELP!
  • 0

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

    hm, new layout im working on http://penguinwithm4a1.org/img/ouf_tehnewz.jpg.


    Looks good :-)
    Posted in: Unit Frames
  • 0

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

    It's a bit trial and error to get them right. oUF_layoutname in that folder you should have a file called layout.lua.

    look for something like this.
    local player = oUF:Spawn("player") 
    player:SetPoint("CENTER", -105, -200)
    
    local target = oUF:Spawn("target")
    target:SetPoint("CENTER", 105, -200)


    SetPoint, thats what you need to edit. In this case, my player and target frames hook into the center of my screen with their center, the numbers indicate how far away from the center.
    SetPoint("anchor point", x value, y value)


    Okay, I changed it abit, the player one was on 0, -400 or something... Tried -150, -351 so it's pretty much aligned with my targetframe which I've set to 150, -351. Think that'll work? :P
    Posted in: Unit Frames
  • 0

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

    it should, let me know if it doesn't.


    I can't find my petbar atleast...
    Posted in: Unit Frames
  • 0

    posted a message on Can't access config menu for Chinchilla
    Date: 2008-03-15 11:06:18
    ID: 52
    Error occured in: Global
    Count: 1
    Message: LibRockConfig-1.0: Bad return from function "args" for `Chinchilla'. Expected "table", got "string" ("@cache").
    Debug:
    ...s\FuBar\libs\LibRockConfig-1.0\LibRockConfig-1.0.lua:1588:
    ...s\FuBar\libs\LibRockConfig-1.0\LibRockConfig-1.0.lua:1434
    ...s\FuBar\libs\LibRockConfig-1.0\LibRockConfig-1.0.lua:3597:
    ...s\FuBar\libs\LibRockConfig-1.0\LibRockConfig-1.0.lua:3560
    ...s\FuBar\libs\LibRockConfig-1.0\LibRockConfig-1.0.lua:2813: Select()
    ...s\FuBar\libs\LibRockConfig-1.0\LibRockConfig-1.0.lua:746: OpenConfigMenu()
    Chinchilla\Chinchilla.lua:147:
    Chinchilla\Chinchilla.lua:145
    (tail call): ?
    AddOns:
    Align
    Atlas, v1.10.3
    AtlasBattlegrounds, v1.10.3
    AtlasDungeonLocs, v1.10.3
    AtlasEntrances, v1.10.3
    AtlasFlightPaths, v1.10.3
    AtlasOutdoorRaids, v1.10.3
    AtlasLoot, vAtlasLoot Enhanced v4.02.01
    Bagnon, v1.4.6
    BagnonForever, v1.0.0
    BagnonTooltips
    Bartender3, v3.1.2 r56537
    Buffalo
    Chinchilla, v1.0r63344
    CML, v1.1
    CooldownCount, v2.1
    cyCircled, v0.5
    cyCircledOnyx, v2.3.0.0
    cyCircledsimpleSquare, v1.0
    cyCircledVolM, v2.3.0.0
    cyCircledVol, v1.0
    DeuceCommander, v1.1
    DrDamage, v1.2.1
    eePanels2, v2.0
    ErrorMonster, v2
    FuBarBagFu, v2.0
    FuBarBattlegroundFu, v2.0
    FuBarDurabilityFu, v2.0
    FuBarFarmerFu, v2.0.$Revision: 37456 $
    FuBarGarbageFu, v2.0.$Revision: 36604 $
    FuBarGarbageFuPrices, v1.0
    FuBarKillMeterFu, v1.0
    FuBarMailFu, v2.0
    FuBarMoneyFu, v20000-1
    FuBarNavigatorFu, v1.0
    FuBarPerformanceFu, v2.0
    FuBarQuestsFu, v2.0
    FuBarTopScoreFu, v2.0
    FuBar, v50710
    gdFont, v2.0
    JIMCooldownPulse
    KLHThreatMeter, v19.18
    Ace2
    LibRockEvent10
    MetaHud, vv20300-3
    MBB
    MobHealth, v3.2
    MoveAnything
    MultiTips, v0.31
    oTweaks, v1.0.0
    oUF, v$Id$
    oUFLily
    Prat, v2.0 57869
    Quartz, v0.1.0
    RatingBuster, v1.3.0 (r56425)
    sct, v5.7
    SharedMedia20, v2.0
    SimpleCombatLog, v1.3.0.54892
    Skinner, v2.3
    SpellBinder, v1.2
    Stubby, v1508
    SWFixLogStrings, v2.0
    SWStats, v2.1.2
    SWUniLog, v2.1.2
    Swatter, v4.0.2
    Talented, v1.3
    TinyTip
    WoWEquip, v0.9
    DBMAPI
    WoWonid, v1.6



    That's the error.
    Posted in: AddOn HELP!
  • 0

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

    It's done through lua, the positioning.

    To just drag them (the position will not save btw), hold down alt to drag them


    Ah thanks. As I really suck in lua coding (couldn't even do the "HelloWorld" one...), anyone know what to write where to get player, target and ToT bars like:
    - -' (whereas the - is player/target and the ' is ToT oO)
    ... (actionbars)
    Posted in: Unit Frames
  • 0

    posted a message on Can't access config menu for Chinchilla
    Title pretty much says it all. I try shift-clicking or whatever the minimap and that error popup well.. kinda... pops up, and says that there is a problem with the root config.
    Got kinda tired of SMM and decided to try something new, well, it's pretty much the same, but Levistubbs (on the EU UI forum) kinda told everyone about Chinchilla. So I went to see if it seemed good, and it did, I liked the shape on some SS's :P
    But now I can only get the "topright corner" one, as that seems to be the default.

    So, help please?

    -Irg ☺
    Posted in: AddOn HELP!
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    I can't find any way to move the frames, anyone help please?
    Posted in: Unit Frames
  • To post a comment, please or register a new account.