Thread Tools Display Modes
Unread 04-19-10, 12:30 AM   #1
wolvereness
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 13
Aura Buttons Repositioning

Okay, so I've been tweaking nUI for the past week. I think I'm almost where I want, but I have still have a bit of a problem.

I'm using nUI_AuraButtons, because screen real estate > buff names. I know all the icons, and it's quicker if it's smaller anyway. Using this addon, the buffs / debuffs seem to be ordered the opposite direction that I think they need to be in, so I reversed the parameters on SortAuras, along with changing the orientation to start from the bottom left (right for debuffs) and work to the center + up.

I can't figure out how to get the pet / vehicle auras to sit on top of the player auras, in the same fashion that the current nUI release does.

I tried (in the pet section of AuraButtons.lua):
relative_to = "$parent_Aura2",

but that just throws an error, saying it's anchoring to itself. Aura1 is the player frame, so I'm not sure how to approach this. I'm getting the naming scheme / frame names and whatnot kinda slow (I'm not used to lua at all).

Last edited by wolvereness : 04-19-10 at 01:03 AM.
wolvereness is offline  
Unread 04-19-10, 04:16 AM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
No... Aura1 and Aura2 are not the player and pet aura frames. Aura1 and Aura2 are the help and harm auras for either the player or the pet depending on which set of auras you're looking at.

If you want to anchor the pet to the player, then you would have to set the "anchor_pt" value to nUI_UNITFRAME_{panel mode}.."_Aura2"

i.e. nUI_UNITFRAME_SOLO.."_Aura2" or nUI_UNITFRAME_PARTY.."_Aura2", etc

if you are going to treat all of your unit frames the same way, then you can get away with using the same anchor for all of the aura buttons.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 05-03-10, 01:03 PM   #3
wolvereness
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 13
Here's what I got, and it seems to float above the friendly buffs. I'd like to know if there's a way to make the pet/vehicle buffs sit right on top of the highest friendly buff currently active, like the default implementation. In the default implementation, it's a "$parent_Aura2", but that throws an anchoring to self error when plugged into the AuraButtons addon.
Code:
local unit_skins =
{
	[nUI_UNITSKIN_SOLOPET]     = "PetAuras",
	[nUI_UNITSKIN_SOLOPLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_SOLOTARGET]  = "TargetAuras",
	[nUI_UNITSKIN_SOLOVEHICLE] = "VehicleAuras",
	
	[nUI_UNITSKIN_PARTYPET]     = "PetAuras",
	[nUI_UNITSKIN_PARTYPLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_PARTYTARGET]  = "TargetAuras",
	[nUI_UNITSKIN_PARTYVEHICLE] = "VehicleAuras",
	
	[nUI_UNITSKIN_RAID10PET]     = "PetAuras",
	[nUI_UNITSKIN_RAID10PLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_RAID10TARGET]  = "TargetAuras",
	[nUI_UNITSKIN_RAID10VEHICLE] = "VehicleAuras",
	
	[nUI_UNITSKIN_RAID15PET]     = "PetAuras",
	[nUI_UNITSKIN_RAID15PLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_RAID15TARGET]  = "TargetAuras",
	[nUI_UNITSKIN_RAID15VEHICLE] = "VehicleAuras",
	
	[nUI_UNITSKIN_RAID20PET]     = "PetAuras",
	[nUI_UNITSKIN_RAID20PLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_RAID20TARGET]  = "TargetAuras",
	[nUI_UNITSKIN_RAID20VEHICLE] = "VehicleAuras",
	
	[nUI_UNITSKIN_RAID25PET]     = "PetAuras",
	[nUI_UNITSKIN_RAID25PLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_RAID25TARGET]  = "TargetAuras",
	[nUI_UNITSKIN_RAID25VEHICLE] = "VehicleAuras",
	
	[nUI_UNITSKIN_RAID40PET]     = "PetAuras",
	[nUI_UNITSKIN_RAID40PLAYER]  = "PlayerAuras",
	[nUI_UNITSKIN_RAID40TARGET]  = "TargetAuras",
	[nUI_UNITSKIN_RAID40VEHICLE] = "VehicleAuras",	
};

local aura_layouts =
{
	["PetAuras"] =
	{
		anchor =
		{
			anchor_pt   = "BOTTOMLEFT",
			relative_to = "nUI_SoloUnit_Player_Aura2",
			relative_pt = "TOPLEFT",
			xOfs        = 0,
			yOfs        = 0,
			[[--
			anchor_pt        = "BOTTOMLEFT",
			relative_to      = "nUI_Dashboard",
			relative_pt      = "CENTER",
			xOfs             = -1270,
			yOfs             = 170,
			--]]
		},		
		options =
		{
			enabled          = true,
			size             = 45,
			strata           = nil,
			level            = 1,
			
			aura_type        = "help",
			origin           = "BOTTOMLEFT",
			player_auras     = false,
			dispellable      = false,
			horizontal       = true,
			highlight_player = true,
			aura_types       = false,
			cooldown_anim    = false,
			flash_expire     = true,
			clickable        = true,
			rows             = 4,
			cols             = 5,
			expire_time      = 10,
			hGap             = 5,
			vGap             = 25,

			count =
			{
				enabled     = true,
				justifyH    = "CENTER",
				justifyV    = "MIDDLE",
				anchor_pt   = "CENTER",
				relative_pt = "CENTER",
				xOfs        = 0,
				yOfs        = 1,
			},

			timer =
			{
				enabled     = true,
				fontsize    = 10.5,
				justifyH    = "CENTER",
				justifyV    = "BOTTOM",
				anchor_pt   = "TOP",
				relative_pt = "BOTTOM",
				xOfs        = 0,
				yOfs        = -1,
			},
		},	
	},
	["PlayerAuras"] =
	{
		anchor =
		{
			anchor_pt        = "BOTTOMLEFT",
			relative_to      = "nUI_Dashboard",
			relative_pt      = "LEFT",
			xOfs             = 0,
			yOfs             = 170,
			[[--
			anchor_pt        = "BOTTOMRIGHT",
			relative_to      = "nUI_Dashboard",
			relative_pt      = "CENTER",
			xOfs             = -420,
			yOfs             = 170,
			--]]
		},		
		options =
		{
			enabled          = true,
			size             = 45,
			strata           = nil,
			level            = 1,
			
			aura_type        = "help",
			origin           = "BOTTOMLEFT",
			player_auras     = false,
			dispellable      = false,
			horizontal       = true,
			highlight_player = true,
			aura_types       = false,
			cooldown_anim    = false,
			flash_expire     = true,
			clickable        = true,
			rows             = 4,
			cols             = 10,
			expire_time      = 10,
			hGap             = 5,
			vGap             = 25,

			count =
			{
				enabled     = true,
				justifyH    = "CENTER",
				justifyV    = "MIDDLE",
				anchor_pt   = "CENTER",
				relative_pt = "CENTER",
				xOfs        = 0,
				yOfs        = 0,
			},

			timer =
			{
				enabled     = true,
				fontsize    = 10.5,
				justifyH    = "CENTER",
				justifyV    = "BOTTOM",
				anchor_pt   = "TOP",
				relative_pt = "BOTTOM",
				xOfs        = 0,
				yOfs        = 0,
			},
		},	
	},
	["TargetAuras"] =
	{
		anchor =
		{
			anchor_pt        = "BOTTOMRIGHT",
			relative_to      = "nUI_Dashboard",
			relative_pt      = "RIGHT",
			xOfs             = 0,
			yOfs             = 170,
			[[--
			anchor_pt        = "BOTTOMLEFT",
			relative_to      = "nUI_Dashboard",
			relative_pt      = "CENTER",
			xOfs             = 420,
			yOfs             = 170,--]]
		},		
		options =
		{
			enabled          = true,
			size             = 45,
			strata           = nil,
			level            = 1,
			
			aura_type        = "help",
			origin           = "BOTTOMRIGHT",
			player_auras     = false,
			dispellable      = false,
			horizontal       = true,
			highlight_player = true,
			aura_types       = false,
			cooldown_anim    = false,
			flash_expire     = true,
			clickable        = true,
			rows             = 4,
			cols             = 10,
			expire_time      = 10,
			hGap             = 5,
			vGap             = 25,

			count =
			{
				enabled     = true,
				justifyH    = "CENTER",
				justifyV    = "MIDDLE",
				anchor_pt   = "CENTER",
				relative_pt = "CENTER",
				xOfs        = 0,
				yOfs        = 0,
			},

			timer =
			{
				enabled     = true,
				fontsize    = 10.5,
				justifyH    = "CENTER",
				justifyV    = "BOTTOM",
				anchor_pt   = "TOP",
				relative_pt = "BOTTOM",
				xOfs        = 0,
				yOfs        = 0,
			},
		},	
	},
	["VehicleAuras"] =
	{
		anchor =
		{
			anchor_pt   = "BOTTOMLEFT",
			relative_to = "nUI_SoloUnit_Player_Aura2",
			relative_pt = "TOPLEFT",
			xOfs        = 0,
			yOfs        = 0,
			[[--
			anchor_pt        = "BOTTOMLEFT",
			relative_to      = "nUI_Dashboard",
			relative_pt      = "CENTER",
			xOfs             = -1270,
			yOfs             = 170,
			--]]
		},		
		options =
		{
			enabled          = true,
			size             = 45,
			strata           = nil,
			level            = 1,
			
			aura_type        = "help",
			origin           = "BOTTOMLEFT",
			player_auras     = false,
			dispellable      = false,
			horizontal       = true,
			highlight_player = true,
			aura_types       = false,
			cooldown_anim    = false,
			flash_expire     = true,
			clickable        = true,
			rows             = 4,
			cols             = 5,
			expire_time      = 10,
			hGap             = 5,
			vGap             = 25,

			count =
			{
				enabled     = true,
				justifyH    = "CENTER",
				justifyV    = "MIDDLE",
				anchor_pt   = "CENTER",
				relative_pt = "CENTER",
				xOfs        = 0,
				yOfs        = 1,
			},

			timer =
			{
				enabled     = true,
				fontsize    = 10.5,
				justifyH    = "CENTER",
				justifyV    = "BOTTOM",
				anchor_pt   = "TOP",
				relative_pt = "BOTTOM",
				xOfs        = 0,
				yOfs        = -1,
			},
		},	
	},
};

local frame = CreateFrame( "Frame", "nUI_AuraButtons", UIParent );

local function onEvent()

	for skin in pairs( unit_skins ) do
		if nUI_UnitSkins[skin] then
			nUI_UnitSkins[skin].elements["Aura"][2] = aura_layouts[unit_skins[skin]];
			nUI_UnitSkins[skin].elements["Label"][2] = nil;
		end
	end
	
end

frame:SetScript( "OnEvent", onEvent );
frame:RegisterEvent( "VARIABLES_LOADED" );
On another note, you gonna make an announcement when one of the releases is 'stable' (or stable until patch)?
wolvereness is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » Aura Buttons Repositioning

Thread Tools
Display Modes

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