Thread Tools Display Modes
Prev Previous Post   Next Post Next
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)?
 
 

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


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