A Defias Bandit
Join Date: May 2010
Posts: 3
|
RothUI, need master's of LUA help)
hi, i m qite new to lua, and i started to edit RothUI, really like it BTW.
here what i get, i want to move the target and tot (target of targer) frames up and place 3d portraits next to thm, scale castbars and other minor stuff.
in --target and castbar scale i've added this:
local totscale = 0.42
local castbarscale = 0.62
then in table frame_positions = { changed 3, 4, 12 and 13 to:
[3] = { a1 = "TOP", a2 = "TOP", af = "UIParent", x = 0, y = -250 }, --Target frame
[4] = { a1 = "CENTER", a2 = "CENTER", af = "oUF_D3Orbs2_TargetFrame", x = 280, y = -70 }, --tot
[12] = { a1 = "CENTER", a2 = "CENTER", af = "oUF_D3Orbs2_TargetFrame", x = 0, y = -70 }, --castbar target
[13] = { a1 = "CENTER", a2 = "CENTER", af = "UIParent", x = 0, y = -350 }, --castbar player
and added
[15] = { a1 = "CENTER", a2 = "CENTER", af = "", x = -159, y = 0 }, --Target Portrait
then in local function d3o2_createCastbar(self,unit) changed self.Castbar:SetScale(targetscale) to look like self.Castbar:SetScale(castbarscale)
local function d3o2_createPortraits(self,unit) was copied two times, in first table
--create portraits func
local function d3o2_createPortraits(self,unit)
self.Portrait_bgf = CreateFrame("Frame",nil,self)
self.Portrait_bgf:SetPoint("BOTTOM",self.Health,"T OP",0,14)
self.Portrait_bgf:SetWidth(self.width+10)
self.Portrait_bgf:SetHeight(self.width+10)
local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND")
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-15,15)
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",15,-15)
back:SetTexture("Interface\\AddOns\\rTextures\\sim plesquare_glow")
back:SetVertexColor(0, 0, 0, 0.7)
was changed to:
local function d3o2_createTargetPortraits(self,unit)
self.Portrait_bgf = CreateFrame("Frame",nil,self)
self.Portrait_bgf:SetPoint(tabvalues.frame_positions[15].a1,self.Health,tabvalues.frame_positions[15].a2, tabvalues.frame_positions[15].x,tabvalues.frame_positions[15].y)
self.Portrait_bgf:SetWidth(self.width/3)
self.Portrait_bgf:SetHeight(self.width/3)
local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND")
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-7,7)
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",7,-7)
back:SetTexture("Interface\\AddOns\\rTextures\\sim plesquare_glow")
back:SetVertexColor(0, 0, 0, 0.7)
and in second table to:
local function d3o2_createTOTPortraits(self,unit)
self.Portrait_bgf = CreateFrame("Frame",nil,self)
self.Portrait_bgf:SetPoint( "CENTER",self.Health,"CENTER", 0,70)
self.Portrait_bgf:SetWidth(self.width - 10 )
self.Portrait_bgf:SetHeight(self.width - 10 )
local back = self.Portrait_bgf:CreateTexture(nil, "BACKGROUND")
back:SetPoint("TOPLEFT",self.Portrait_bgf,"TOPLEFT ",-7,7)
back:SetPoint("BOTTOMRIGHT",self.Portrait_bgf,"BOT TOMRIGHT",7,-7)
back:SetTexture("Interface\\AddOns\\rTextures\\sim plesquare_glow")
back:SetVertexColor(0, 0, 0, 0.7)
next in --create the target style added d3o2_createTargetPortraits(self,unit) to the end of the list, so it looks like
d3o2_createDebuffGlow(self,unit)
d3o2_createIcons(self,unit)
d3o2_createComboPoints(self,unit)
d3o2_createTargetPortraits(self,unit)
and in --create the tot style added d3o2_createTOTPortraits(self,unit) to the end of the list so it now looks like this:
d3o2_createLowHP(self,unit)
d3o2_createDebuffGlow(self,unit)
d3o2_createIcons(self,unit)
d3o2_createTOTPortraits(self,unit)
and changed self:SetAttribute('initial-scale', totscale)
end;
yeah, so like that... now when i log in i see no unit frames and get a nasty lua error:
Message: Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:978: <unnamed>:SetPoint(): Unknown region point
Time: 05/31/10 06:07:37
Count: 1
Stack: [C]: in function `SetPoint'
Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:978: in function <Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:971>
Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:1377: in function `styleFunc'
Interface\AddOns\oUF\ouf.lua:413: in function <Interface\AddOns\oUF\ouf.lua:405>
Interface\AddOns\oUF\ouf.lua:484: in function <Interface\AddOns\oUF\ouf.lua:480>
Interface\AddOns\oUF\ouf.lua:534: in function `Spawn'
Interface\AddOns\oUF_D3Orbs\oUF_D3Orbs.lua:1473: in main chunk
Locals: (*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = "TOPLEFT"
(*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = "TOPLEFT "
(*temporary) = -7
(*temporary) = 7
can someone please say what i did wrong? please...
i have attached a lua file, can someone correct my mistakes, so ui would look like on the images i've attached.
code
oUF_D3Orbs.lua
images
|