Thread Tools Display Modes
10-26-10, 03:25 PM   #1
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
Frame scale on oUF raid quesitons

I am in the process of setting up oUF_AuraWatch and anchoring icons to the top of my raid frames. I've managed to get everything setup and working properly but I've run across and issue. Setting the raid scale scale properly increases the size of units within the raid, but the underlying frame which I'm assuming tells oUF where to put the units is not scaling with the increased scale. This leads to icons anchored to the top of the frame to be out of position. I'm using oUF_Drk. Any ideas on how to fix this?

1.2 scale and anchor points not correct:


1.0 scale and anchor points correct:


I would just setup X and Y offsets to fix it, but the degree of it being off is different depending on if I'm in a 5 man, 10 man or 25 man.

Last edited by maltese : 10-26-10 at 03:28 PM.
  Reply With Quote
10-26-10, 03:28 PM   #2
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Could you pls. provide us with your code?

Seems to me like you're not anchoring correctly, which should be fixed in no time...
__________________
  Reply With Quote
10-26-10, 03:38 PM   #3
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
Here is the code from my AuraWatch

Code:
lib.createAuraWatch = function(self, unit)
	local auras = {}
	local spellIDs = {
		52127, -- water shield
		974 -- earth shield
		}
		
	auras.presentAlpha = 1
	auras.missingAlpha = .5
	auras.PostCreateIcon = nil
	-- Set any other AuraWatch settings
	auras.icons = {}
	
	for i, sid in pairs(spellIDs) do
		local icon = CreateFrame("Frame", nil, self)
		icon.spellID = sid
		icon:SetWidth(24)
		icon:SetHeight(24)
		if (i == 1) then -- Water Shield
			icon:SetPoint("TOPLEFT", oUF_Raid, "TOPLEFT", 0, 32)
		elseif (i == 2) then -- Earth Shield
			auras.fromUnits = {["player"] = true, ["party"] = true}
			icon:SetPoint("TOPRIGHT", oUF_Raid, "TOPRIGHT", 0, 32)
		end
		auras.icons[sid] = icon
		-- Set any other AuraWatch icon settings
	end
	self.AuraWatch = auras
end
Fairly certain its not an issue with the AuraWatch coding as it looks perfect when I set the scale on my raid frames to 1. The issue only arises when I change the scale on the raid frames and it gets progressively worse when I change the scale higher or the raid gets larger. I'm trying to figure out how to scale the 'background' (for lack of a better word) of the raid to match what the actual scale of the units inside the raid are, but I'm still a lua scrub and can't find where those sizes are set at.

Heres the code for the Raid frames within the core lua

Code:
	if cfg.ShowRaid then
		CompactRaidFrameContainer:Hide()
		local maxGroups = 5
		if cfg.RaidShowAllGroups then maxGroups = 8 end
		self:SetActiveStyle('drkGroup')
		local raid = oUF:SpawnHeader("oUF_Raid", nil, "solo,party,raid", 
		"showRaid", cfg.ShowRaid,  
		"showPlayer", true,
		"showSolo", cfg.RaidShowSolo,
		"showParty", cfg.ShowParty,
		"xoffset", 9,
		"yOffset", 5,
		"groupFilter", "1,2,3,4,5,6,7,8",
		"groupBy", "GROUP",
		"groupingOrder", "1,2,3,4,5,6,7,8",
		"sortMethod", "INDEX",
		"maxColumns", maxGroups,
		"unitsPerColumn", 5,
		"columnSpacing", 7,
		"point", "LEFT",
		"columnAnchorPoint", cfg.RaidAnchorPoint,
		"oUF-initialConfigFunction", ([[
		self:SetWidth(%d)
		self:SetHeight(%d)
		]]):format(72, 28))
		raid:SetPoint("BOTTOMLEFT", UIParent, cfg.RaidRelativePoint, cfg.RaidX, cfg.RaidY)
	end

Last edited by maltese : 10-26-10 at 03:45 PM.
  Reply With Quote
10-26-10, 03:44 PM   #4
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
lua Code:
  1. lib.createAuraWatch = function(self, unit)
  2.     local auras = {}
  3.     local spellIDs = {
  4.         52127, -- water shield
  5.         974 -- earth shield
  6.         }
  7.        
  8.     auras.presentAlpha = 1
  9.     auras.missingAlpha = .5
  10.     auras.PostCreateIcon = nil
  11.     -- Set any other AuraWatch settings
  12.     auras.icons = {}
  13.    
  14.     for i, sid in pairs(spellIDs) do
  15.         local icon = CreateFrame("Frame", nil, self)
  16.         icon.spellID = sid
  17.         icon:SetWidth(24)
  18.         icon:SetHeight(24)
  19.         if (i == 1) then -- Water Shield
  20.             icon:SetPoint("TOPLEFT", oUF_Raid, "TOPLEFT", 0, 32)
  21.         elseif (i == 2) then -- Earth Shield
  22.             auras.fromUnits = {["player"] = true, ["party"] = true}
  23.             icon:SetPoint("TOPRIGHT", oUF_Raid, "TOPRIGHT", 0, 32)
  24.         end
  25.         auras.icons[sid] = icon
  26.         -- Set any other AuraWatch icon settings
  27.     end
  28.     self.AuraWatch = auras
  29. end

Look at line 20 and 23, you're anchoring to oUF_Raid and no specific raid-unit. This could be the source of the offset when using a scale < 1.
__________________
  Reply With Quote
10-26-10, 03:51 PM   #5
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
I'm not trying to anchor to a specific unit. I'm wanting to anchor to the top of the actual raid frame and use the aura watch icons to track my water shield and earth shield stacks.

If anchoring it to a specific unit will solve the issue, how would I go about having it automatically adjust so its at the top of my raid frames when I switch between a 5 man, 10 man and 25 man?
  Reply With Quote
10-26-10, 03:59 PM   #6
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
The best way to set a position is to use two anchors, especially if you want this frame to be resizeable and/or scalable.

Like (TOPLEFT, parent, TOPRIGHT, x, y) instead of (TOPRIGHT, parent, TOPRIGHT, x, y)

Since this would place it to the TOPRIGHT side and you seem to want it at the topright ... err top, you might need this.

(BOTTOMRIGHT, parent, TOPRIGHT, x, y)
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
10-26-10, 10:35 PM   #7
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
Setting a second anchor point made it useable. The gap between the icons in a party is several pixels higher than a 25 man raid but its definitely liveable. Thanks!
  Reply With Quote
10-27-10, 01:49 AM   #8
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
What is the tag to do lua code in this forum?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-27-10, 02:16 AM   #9
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by zork View Post
What is the tag to do lua code in this forum?
<highlight=lua> -- magic </highlight>


Replace < with [ and > with ]... You could have easily find this out by quoting my post...
__________________
  Reply With Quote
10-27-10, 05:27 AM   #10
Rostok
A Flamescale Wyrmkin
Join Date: Jul 2008
Posts: 127
It seems the SetPoint for your auras are done before the scale of your raid frames.
Did you try to put your SetScale(...) before your auras spawning code ?
  Reply With Quote
10-27-10, 07:44 AM   #11
drakull
A Cyclonian
 
drakull's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 49
Maltese, AuraWatch support will be included in my layout's next release so maybe it's best for you to wait for it and then customize it to your liking.

OMG, Someone's actually using my layout, woot!
  Reply With Quote
10-27-10, 07:46 AM   #12
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
The scale is set before the auras are called. I was playing with /fstack last night trying to figure out why it not working like I thought it should. Setting the scale for raid frames is increasing the size of the units in the raid. So oUF_RaidUnitButton1 through oUF_RaidUnitButton25 are scaled at 1.2. The issue is the oUF_Raid where all the RaidUnitButtons are attached too, is not scaling to 1.2. Moving my mouse cursor to the right side of my raid frames and the top of my raid frames with FStack displayed shows where the parent frame stops short in both cases. When setting the scale back down to 1, this does not occur.

It would be nice to be able to set the scale correctly so I don't have this increasing gap between my AuraWatch icons the smaller my party/raid is, but its working well enough now that I'm not going to lose any sleep over it

EDIT: Drakull! that is great news. PS, I'm as anal as it comes to my UI. Your layout is definitely the best one I've found that works for me keep up the good work.
  Reply With Quote
10-27-10, 08:22 AM   #13
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Set the scale on the header instead. Wouldn't that solve your issue?

(sent from my phone)
__________________
「貴方は1人じゃないよ」
  Reply With Quote
10-27-10, 10:16 AM   #14
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
Originally Posted by haste View Post
Set the scale on the header instead. Wouldn't that solve your issue?

(sent from my phone)
How would I go about that. Setting the scale at the format line in this code:
Code:
	if cfg.ShowRaid then
		CompactRaidFrameContainer:Hide()
		local maxGroups = 5
		if cfg.RaidShowAllGroups then maxGroups = 8 end
		self:SetActiveStyle('drkGroup')
		local raid = oUF:SpawnHeader("oUF_Raid", nil, "solo,party,raid", 
		"showRaid", cfg.ShowRaid,  
		"showPlayer", true,
		"showSolo", cfg.RaidShowSolo,
		"showParty", cfg.ShowParty,
		"xoffset", 9,
		"yOffset", 5,
		"groupFilter", "1,2,3,4,5,6,7,8",
		"groupBy", "GROUP",
		"groupingOrder", "1,2,3,4,5,6,7,8",
		"sortMethod", "INDEX",
		"maxColumns", maxGroups,
		"unitsPerColumn", 5,
		"columnSpacing", 7,
		"point", "LEFT",
		"columnAnchorPoint", cfg.RaidAnchorPoint,
		"oUF-initialConfigFunction", ([[
		self:SetWidth(%d)
		self:SetHeight(%d)
		]]):format(72 * cfg.raidScale, 28 * cfg.raidScale))
		raid:SetPoint("BOTTOMLEFT", UIParent, cfg.RaidRelativePoint, cfg.RaidX, cfg.RaidY)
	end
produces correct size parent frame, but then some of the elements of the unit frames are displayed incorrectly (unit frame not extending down far enough to include power bar, text scale, etc)
  Reply With Quote
10-27-10, 11:46 AM   #15
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
I was just thinking:
raid:SetScale(1.2)

It will apply to all frames related to the header.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
10-27-10, 12:31 PM   #16
maltese
A Wyrmkin Dreamwalker
 
maltese's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 54
dur... not sure why I didn't think of that, but it solves every single issue I've been having with anchoring stuff to my raid frames. Thanks
  Reply With Quote
10-28-10, 09:01 AM   #17
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Sometimes the solution is easy as pie.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-29-10, 05:50 AM   #18
Saintvallen
An Aku'mai Servant
Join Date: Feb 2007
Posts: 33
Originally Posted by zork View Post
Sometimes the solution is easy as pie.
How often do you actually cook pie Zork? Cause it's a motherblocker to get right >.<
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Frame scale on oUF raid quesitons


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off