View Single Post
10-29-09, 02:35 AM   #295
Heimdall
A Murloc Raider
Join Date: Jul 2009
Posts: 9
I all,
i'm new to oUF and i'm trying to set the party width without success, i've used as a base the oUF_Lyn layout plus several others i've found to get some examples how this mod works.
Anyway i've changed something about the party frame (for example how debuff are shown, and the position), what i can't change is the width or height, this is the code i'm using (i managed to change size of the other frames anyway):
Code:
	if(self:GetParent():GetName():match"oUF_Party") then
		self:SetWidth(250)
		self:SetHeight(20)
		self.Health:SetWidth(240)
		self.Power:SetWidth(240)
		self.Health:SetHeight(15)
		self.Power:SetHeight(3)
		self.Power.value:Hide()
		self.Health.value:SetPoint("RIGHT", 0 , 9)
		self.Name:SetPoint("LEFT", 0, 9)

		--
		-- debuffs
		--
		self.Debuffs = CreateFrame("Frame", nil, self)
		self.Debuffs.size = 20 * 1.4
		self.Debuffs:SetHeight(self.Debuffs.size)
		self.Debuffs:SetWidth(self.Debuffs.size * 5)
		self.Debuffs:SetPoint("RIGHT", self, "LEFT", -5, 0)
		self.Debuffs.initialAnchor = "TOPRIGHT"
		self.Debuffs["growth-x"] = "LEFT"
	    self.Debuffs.filter = false
		self.Debuffs.showDebuffType = true
		self.Debuffs.spacing = 2
		self.Debuffs.num = 4 -- max debuffs
		
		--
		-- raid target icons
		--
		self.RaidIcon = self.Health:CreateTexture(nil, "OVERLAY")
		self.RaidIcon:SetHeight(24)
		self.RaidIcon:SetWidth(24)
		self.RaidIcon:SetPoint("LEFT", self, -30, 0)
		self.RaidIcon:SetTexture"Interface\\TargetingFrame\\UI-RaidTargetingIcons"
	end
This is how i spawn the frame:
Code:
local party	= oUF:Spawn("header", "oUF_Party")
party:SetManyAttributes("showParty", true, "yOffset", -15, "initial-width", 220)
party:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -55, -350)
party:Show()
party:SetAttribute("showRaid", false)
Now i've tryed to put initial-width but i'm not using the right way it seems, if you look at the first two lines i've set the width of the frame but in game i can put 500 or 10 in that line that it doesn't matter, what am i missing?

Thanks a lot for the help
Heimdall

Last edited by Heimdall : 10-29-09 at 02:39 AM.