WoW oUF Lybrial addon Dragonflight/Wrath of the Lich King Classic 2024
logo
wow addon oUF Lybrial

oUF Lybrial

Game Version: 8.1.0 +1
Total Downloads: 645
Updated: Feb 12, 2019
Created: Feb 12, 2019
download oUF LybrialDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
v1.0 release 88.25 KB Feb 12, 2019 8.1.0 +1 645 download oUF Lybrial v1.0 releaseDownload

Screenshots

Description

Share this:

oUF Lybrial is an invisible layout.
It's meant to be used for the Lybrial UI.

It has the following features:

  • oUF is embedded
  • oUF MovableFrames is embedded (type /lmf to move).

The following units are supported:

  • Player
  • Focus
  • Pet
  • Target
  • Target of Target

This Layout can be used by anyone who creates UnitFrames using WeakAuras

to make them clickable. It is indeed possible to make WeakAuras clickable with 
WeakAuras alone but it is not recommended since it is very hacky and comes 
hand in hand with some bugs.

You can adjust position and size by typing /lmf into the ingame chat.
Alternatively you can adjust position and size directly inside the code.
As you can see in the following code the Player UnitFrame for example
has a width of 200, a height of 30 and is located at x = -230 and y = -250
relative to the CENTER of the screen.

local _, ns = ...
local oUF = ns.oUF

local UnitSpecific = {
	player = function(self)
		self:SetWidth(200)
	end,
	focus = function(self)
		self:SetWidth(100)
	end,
	pet = function(self)
		self:SetWidth(100)
	end,
	target = function(self)
		self:SetWidth(200)
	end,
	targettarget = function(self)
		self:SetWidth(100)
	end
}

local function Shared(self, unit)
	self:RegisterForClicks('AnyUp')
	self:SetScript('OnEnter', UnitFrame_OnEnter)
	self:SetScript('OnLeave', UnitFrame_OnLeave)
	self:SetHeight(30)

	if (UnitSpecific[unit]) then
		return UnitSpecific[unit](self)
	end
end

oUF:RegisterStyle('Lybrial', Shared)
oUF:Factory(function(self)
	self:SetActiveStyle('Lybrial')
	self:Spawn('player'):SetPoint('CENTER', -230, -250)
	self:Spawn('focus'):SetPoint('CENTER', -180, -280)
	self:Spawn('pet'):SetPoint('CENTER', -280, -280)
	self:Spawn('target'):SetPoint('CENTER', 230, -250)
	self:Spawn('targettarget'):SetPoint('CENTER', 280, -280)
end)
 

 

 

Comments

Add a comment